mirror of
https://github.com/dgibson/dtc.git
synced 2026-07-10 13:29:48 -04:00
ci: Merge make and meson jobs using build matrix
Combine build-make/build-meson into build-linux and build-freebsd-make/build-freebsd-meson into build-freebsd, each with a build: [make, meson] matrix dimension. Assisted-by: Claude:claude-opus-4-6 Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
6c1426dfa9
commit
5f919a25d7
1 changed files with 29 additions and 64 deletions
91
.github/workflows/build.yml
vendored
91
.github/workflows/build.yml
vendored
|
|
@ -18,13 +18,14 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-make:
|
build-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ "alpine", "archlinux", "fedora", "ubuntu" ]
|
os: [ "alpine", "archlinux", "fedora", "ubuntu" ]
|
||||||
|
build: [ "make", "meson" ]
|
||||||
|
|
||||||
container:
|
container:
|
||||||
image: ${{ matrix.os }}
|
image: ${{ matrix.os }}
|
||||||
|
|
@ -34,43 +35,26 @@ jobs:
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: ./scripts/install-deps.sh
|
||||||
./scripts/install-deps.sh
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build (Make)
|
||||||
run: |
|
if: matrix.build == 'make'
|
||||||
make
|
run: make
|
||||||
|
|
||||||
- name: Run check
|
- name: Run check (Make)
|
||||||
run: |
|
if: matrix.build == 'make'
|
||||||
make check
|
run: make check
|
||||||
|
|
||||||
build-meson:
|
- name: Setup (Meson)
|
||||||
runs-on: ubuntu-latest
|
if: matrix.build == 'meson'
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ "alpine", "archlinux", "fedora", "ubuntu" ]
|
|
||||||
|
|
||||||
container:
|
|
||||||
image: ${{ matrix.os }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: |
|
|
||||||
./scripts/install-deps.sh
|
|
||||||
|
|
||||||
- name: Setup
|
|
||||||
run: meson setup -D python=enabled -D yaml=enabled build
|
run: meson setup -D python=enabled -D yaml=enabled build
|
||||||
|
|
||||||
- name: Build
|
- name: Build (Meson)
|
||||||
|
if: matrix.build == 'meson'
|
||||||
run: meson compile -C build
|
run: meson compile -C build
|
||||||
|
|
||||||
- name: Run check
|
- name: Run check (Meson)
|
||||||
|
if: matrix.build == 'meson'
|
||||||
run: if ! meson test -C build; then cat build/meson-logs/testlog.txt; false; fi
|
run: if ! meson test -C build; then cat build/meson-logs/testlog.txt; false; fi
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
|
|
@ -145,15 +129,16 @@ jobs:
|
||||||
meson setup -Dtools=true -Dtests=false build
|
meson setup -Dtools=true -Dtests=false build
|
||||||
meson compile -C build
|
meson compile -C build
|
||||||
|
|
||||||
build-freebsd-make:
|
build-freebsd:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version: [ "13.5", "14.3" ]
|
version: [ "13.5", "14.3" ]
|
||||||
|
build: [ "make", "meson" ]
|
||||||
|
|
||||||
name: FreeBSD ${{ matrix.version }} make build
|
name: FreeBSD ${{ matrix.version }} ${{ matrix.build }} build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -170,47 +155,27 @@ jobs:
|
||||||
shell: cpa.sh {0}
|
shell: cpa.sh {0}
|
||||||
run: sudo ./scripts/install-deps.sh
|
run: sudo ./scripts/install-deps.sh
|
||||||
|
|
||||||
- name: Build
|
- name: Build (Make)
|
||||||
|
if: matrix.build == 'make'
|
||||||
shell: cpa.sh {0}
|
shell: cpa.sh {0}
|
||||||
run: gmake
|
run: gmake
|
||||||
|
|
||||||
- name: Run check
|
- name: Run check (Make)
|
||||||
|
if: matrix.build == 'make'
|
||||||
shell: cpa.sh {0}
|
shell: cpa.sh {0}
|
||||||
run: gmake check
|
run: gmake check
|
||||||
|
|
||||||
build-freebsd-meson:
|
- name: Setup (Meson)
|
||||||
runs-on: ubuntu-latest
|
if: matrix.build == 'meson'
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
version: [ "13.5", "14.3" ]
|
|
||||||
|
|
||||||
name: FreeBSD ${{ matrix.version }} meson build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Start VM
|
|
||||||
uses: cross-platform-actions/action@v1
|
|
||||||
with:
|
|
||||||
operating_system: freebsd
|
|
||||||
version: ${{ matrix.version }}
|
|
||||||
shell: sh
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
shell: cpa.sh {0}
|
|
||||||
run: sudo ./scripts/install-deps.sh
|
|
||||||
|
|
||||||
- name: Setup
|
|
||||||
shell: cpa.sh {0}
|
shell: cpa.sh {0}
|
||||||
run: meson setup -D python=enabled -D yaml=enabled build
|
run: meson setup -D python=enabled -D yaml=enabled build
|
||||||
|
|
||||||
- name: Build
|
- name: Build (Meson)
|
||||||
|
if: matrix.build == 'meson'
|
||||||
shell: cpa.sh {0}
|
shell: cpa.sh {0}
|
||||||
run: meson compile -C build
|
run: meson compile -C build
|
||||||
|
|
||||||
- name: Run check
|
- name: Run check (Meson)
|
||||||
|
if: matrix.build == 'meson'
|
||||||
shell: cpa.sh {0}
|
shell: cpa.sh {0}
|
||||||
run: if ! meson test -C build; then cat build/meson-logs/testlog.txt; false; fi
|
run: if ! meson test -C build; then cat build/meson-logs/testlog.txt; false; fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue