From 8f6a0dbaa7804c8eb0658fc4c38fbdf5e645cff7 Mon Sep 17 00:00:00 2001 From: KOUNOIKE Yuusuke Date: Wed, 30 Apr 2025 00:38:40 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=9B=E3=82=B9=E3=83=88=E3=82=9224.04?= =?UTF-8?q?=E3=81=AB=E3=81=97=E3=81=A620.04=E3=81=AE=E3=82=B3=E3=83=B3?= =?UTF-8?q?=E3=83=86=E3=83=8A=E3=82=92=E4=BD=BF=E3=81=A3=E3=81=A6deb?= =?UTF-8?q?=E3=82=92=E3=83=93=E3=83=AB=E3=83=89=E3=80=81dkms=E5=8B=95?= =?UTF-8?q?=E4=BD=9C=E3=81=AE=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=EF=BC=86?= =?UTF-8?q?build=E3=81=AE=E3=81=BF=E3=82=92=E8=A1=8C=E3=81=86PR=E3=83=AF?= =?UTF-8?q?=E3=83=BC=E3=82=AF=E3=83=95=E3=83=AD=E3=83=BC=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 44 +++++++++++++++++++++++++ .github/workflows/build_and_release.yml | 34 +++++++++++++++---- 2 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e0913e3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Build and Check Debian Package + +on: + pull_request: + branches: + - develop + +jobs: + build: + name: Build and Check Debian Package + runs-on: ubuntu-24.04 + container: + image: ubuntu:20.04 + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install DKMS + run: apt-get update && apt-get install -y -q --no-install-recommends debhelper devscripts dh-exec dkms dpkg + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + + - name: Build Debian package + run: dkms mkdeb --source-only + shell: bash + + - name: Check artifacts + run: ls -l ../*.deb + shell: bash + + - name: Check install + run: dpkg -i $(ls -1 ../*.deb | head -n 1) + shell: bash + + - name: Check dkms install + run: apt-get install -y linux-headers-virtual + shell: bash + + - name: Check dkms result + run: ls -l /lib/modules/*/updates/dkms/px4_drv.ko* + shell: bash diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 3d1efc7..3716fe9 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -3,28 +3,48 @@ name: Build and Release Debian Package on: push: tags: - - '*' + - "*" jobs: - build_and_release: name: Build and Release Debian Package - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 + container: + image: ubuntu:20.04 permissions: contents: write steps: - - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install DKMS - run: sudo apt-get install -y debhelper devscripts dh-exec dkms dpkg + run: apt-get update && apt-get install -y -q --no-install-recommends debhelper devscripts dh-exec dkms dpkg + shell: bash + env: + DEBIAN_FRONTEND: noninteractive - name: Build Debian package run: dkms mkdeb --source-only + shell: bash + + - name: Check artifacts + run: ls -l ../*.deb + shell: bash + + - name: Check install + run: dpkg -i $(ls -1 ../*.deb | head -n 1) + shell: bash + + - name: Check dkms install + run: apt-get install -y linux-headers-virtual + shell: bash + + - name: Check dkms result + run: ls -l /lib/modules/*/updates/dkms/px4_drv.ko* + shell: bash - name: Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: generate_release_notes: true files: |