mirror of
https://github.com/tsukumijima/px4_drv.git
synced 2025-07-23 04:03:01 +02:00
ホストを24.04にして20.04のコンテナを使ってdebをビルド、dkms動作のチェック&buildのみを行うPRワークフロー追加
This commit is contained in:
44
.github/workflows/build.yml
vendored
Normal file
44
.github/workflows/build.yml
vendored
Normal file
@@ -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
|
34
.github/workflows/build_and_release.yml
vendored
34
.github/workflows/build_and_release.yml
vendored
@@ -3,28 +3,48 @@ name: Build and Release Debian Package
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- "*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build_and_release:
|
build_and_release:
|
||||||
name: Build and Release Debian Package
|
name: Build and Release Debian Package
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-24.04
|
||||||
|
container:
|
||||||
|
image: ubuntu:20.04
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install DKMS
|
- 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
|
- name: Build Debian package
|
||||||
run: dkms mkdeb --source-only
|
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
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
files: |
|
files: |
|
||||||
|
Reference in New Issue
Block a user