Skip to content

MrDuartePT running Build #453

MrDuartePT running Build

MrDuartePT running Build #453

Workflow file for this run

name: Build
run-name: ${{ github.actor }} running Build
on:
pull_request:
branches: [ main ]
push:
branches: [ main, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: ./deploy/dependencies/install_dependencies_ubuntu.sh
shell: bash
- name: Build
run: ./tests/test_kernel_build.sh
shell: bash
- name: Install
run: ./tests/test_kernel_install.sh
shell: bash
run-kernel-module-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: ./deploy/dependencies/install_dependencies_ubuntu.sh
shell: bash
- name: Test Install
run: ./tests/test_kernel_install.sh
shell: bash
- name: Test Reload First
run: ./tests/test_kernel_reload.sh
shell: bash
- name: Test Reload Second
run: ./tests/test_kernel_reload.sh
shell: bash
run-kernel-dkms-install-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: ./deploy/dependencies/install_dependencies_ubuntu.sh
shell: bash
- name: Build
run: ./tests/test_kenel_dkms_install.sh || true
shell: bash
run-tests:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Install Development Dependencies
run: ./deploy/dependencies/install_development_dependencies_ubuntu.sh
shell: bash
- name: Lint with Linux checkpath
if: always()
run: ./tests/test_kernel_checkpath.sh
shell: bash
- name: Lint with pylint
if: always()
run: ./tests/test_python.sh
shell: bash
- name: Test python CLI
if: always()
run: ./tests/test_python_cli.sh
shell: bash
- name: Test python GUI
if: always()
run: ./tests/test_python_gui.sh
shell: bash
- name: Install python package
if: always()
run: ./deploy/python_install_pip_pkg.sh
shell: bash
test-in-docker-container:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build containers and run tests inside them
run: ./deploy/build_containers.sh
shell: bash
release-deb-kernel-patch:
needs: [build, run-kernel-module-test, run-kernel-dkms-install-test, run-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check if tagged
id: check_if_tagged
run: |
otag=$(git tag --points-at HEAD)
echo "Tag is ${otag}"
if [ -z "$otag" ]
then
hastag=0
else
hastag=1
fi
echo "hastag=$hastag" >> $GITHUB_OUTPUT
- name: Build kernel patch
if: steps.check_if_tagged.outputs.hastag == 1
run: ./deploy/build_kernelpatch.sh
shell: bash
- name: Set tag name
if: steps.check_if_tagged.outputs.hastag == 1
id: tag
run: |
tag=$(git describe --tags --abbrev=0)
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Create Draft Release
if: steps.check_if_tagged.outputs.hastag == 1
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.tag }}
release_name: ${{ steps.tag.outputs.tag }}
draft: true
prerelease: false
- name: Upload Release - Kernel Patch
if: steps.check_if_tagged.outputs.hastag == 1
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /tmp/linux/linux/0001-Add-legion-laptop-v0.1.patch
asset_name: 0001-Add-legion-laptop-v0.1.patch
asset_content_type: text/plain
- name: Publish Release
if: steps.check_if_tagged.outputs.hastag == 1
uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}