diff options
author | Xiaotian Wu <[email protected]> | 2025-05-20 09:34:48 +0800 |
---|---|---|
committer | Xiaotian Wu <[email protected]> | 2025-05-20 09:45:45 +0800 |
commit | a46f314eab54aed9a59c983583caa065bff7f4a5 (patch) | |
tree | aef103f0b17cc6e3f5cecffb4f841c4fa5314445 | |
parent | 71241d2e3040cdc9e4d982de2241120da5d38779 (diff) | |
download | atril-github-action.tar.bz2 atril-github-action.tar.xz |
CI: meson and autotools use two jobsgithub-action
-rwxr-xr-x | .github/workflows/builds.sh | 4 | ||||
-rw-r--r-- | .github/workflows/builds.yml | 10 | ||||
-rw-r--r-- | .github/workflows/release.yml | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/.github/workflows/builds.sh b/.github/workflows/builds.sh index 6f749307..693082be 100755 --- a/.github/workflows/builds.sh +++ b/.github/workflows/builds.sh @@ -16,7 +16,7 @@ infoend() { # Run meson first, then run autotools # Because meson dist requires a clean git workspace # Autotools will modify some files (such as po, etc.), making them dirty. -if [ -f meson.build ]; then +if [[ -f meson.build && $1 == "meson" ]]; then infobegin "Configure (meson)" meson setup _build --prefix=/usr @@ -45,7 +45,7 @@ if [ -f meson.build ]; then infoend fi -if [ -f autogen.sh ]; then +if [[ -f autogen.sh && $1 == "autotools" ]]; then infobegin "Configure (autotools)" NOCONFIGURE=1 ./autogen.sh ./configure --prefix=/usr --enable-compile-warnings=maximum || { diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index e71c9ad5..65b9bc9c 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -20,7 +20,7 @@ env: jobs: build: - name: Build on ${{matrix.container}} (using ${{matrix.cc}}) + name: ${{matrix.container}} (${{matrix.cc}} ${{matrix.build-system}}) runs-on: ubuntu-latest container: image: ${{matrix.container}} @@ -39,8 +39,14 @@ jobs: ] cc: ["gcc"] cxx: ["g++"] + build-system: ["autotools", "meson"] include: - container: "archlinux:latest" + build-system: "autotools" + cc: "clang" + cxx: "clang++" + - container: "archlinux:latest" + build-system: "meson" cc: "clang" cxx: "clang++" @@ -90,4 +96,4 @@ jobs: # INFO: M-C-C depends mate-desktop 1.27.1+, install finished. - name: Build the source code - run: .github/workflows/builds.sh + run: .github/workflows/builds.sh ${{ matrix.build-system }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2134f9ac..07a1db96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: run: sudo .github/workflows/mate-desktop.sh ${{env.MATE_DESKTOP_VERSION}} ${{ env.CACHE_PATH }} - name: Build the source code - run: .github/workflows/builds.sh + run: .github/workflows/builds.sh meson - name: Install GH CLI uses: dev-hanz-ops/[email protected] |