summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-02-26 13:05:49 -0600
committerDudemanguy <random342@airmail.cc>2023-03-02 15:45:27 +0000
commite82d9045a4625076fafafa6c4f76b35101a3adca (patch)
treee4ccfcac8c4820d7182d55ce3630f28bf9267bfd /.github
parent9db818279aa63d071f2bca369235285314444dcd (diff)
downloadmpv-e82d9045a4625076fafafa6c4f76b35101a3adca.tar.bz2
mpv-e82d9045a4625076fafafa6c4f76b35101a3adca.tar.xz
ci: separate meson tests and reorganize build steps
Instead of running the test directly in the build script, we can make a separate step in the workflow so it looks a little prettier. For running the actual tests, we skip mingw since they will never be run (cross compiled). Additionally, improve the github workflow logic a bit so that way logs on failure are only shown when that specific step fails. The freebsd job still has to be less elegant since it's in a weird vm thingy. Not really related but the location of various build directories (particularly waf) are corrected as well (might as well).
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml72
1 files changed, 58 insertions, 14 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 35ac51f1cd..3250162fa2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -37,26 +37,28 @@ jobs:
TARGET: ${{ matrix.target }}
- name: Build with meson
+ id: build
run: |
./ci/build-mingw64.sh meson pack
env:
TARGET: ${{ matrix.target }}
- name: Print meson log
- if: ${{ failure() }}
+ if: steps.build.outcome == 'failure'
run: |
cat ./build/meson-logs/meson-log.txt
- name: Build with waf
+ id: build_waf
run: |
./ci/build-mingw64.sh waf
env:
TARGET: ${{ matrix.target }}
- name: Print waf log
- if: ${{ failure() }}
+ if: steps.build_waf.outcome == 'failure'
run: |
- cat ./build/config.log
+ cat ./build_waf/config.log
- uses: actions/upload-artifact@v3
with:
@@ -86,6 +88,7 @@ jobs:
brew install autoconf automake pkg-config libtool python freetype fribidi little-cms2 lua@5.1 libass ffmpeg meson
- name: Build with meson
+ id: build
run: |
./ci/build-macos.sh meson
env:
@@ -93,11 +96,22 @@ jobs:
TRAVIS_OS_NAME: "${{ matrix.os }}"
- name: Print meson log
- if: ${{ failure() }}
+ if: steps.build.outcome == 'failure'
run: |
cat ./build/meson-logs/meson-log.txt
+ - name: Run meson tests
+ id: tests
+ run: |
+ meson test -C build
+
+ - name: Print meson test log
+ if: steps.tests.outcome == 'failure'
+ run: |
+ cat ./build/meson-logs/testlog.txt
+
- name: Build with waf
+ id: build_waf
run: |
./ci/build-macos.sh waf
env:
@@ -105,9 +119,9 @@ jobs:
TRAVIS_OS_NAME: "${{ matrix.os }}"
- name: Print waf log
- if: ${{ failure() }}
+ if: steps.build_waf.outcome == 'failure'
run: |
- cat ./build/config.log
+ cat ./build_waf/config.log
linux:
runs-on: "ubuntu-22.04"
@@ -130,22 +144,34 @@ jobs:
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Build with meson
+ id: build
run: |
./ci/build-tumbleweed.sh meson
- name: Print meson log
- if: ${{ failure() }}
+ if: steps.build.outcome == 'failure'
run: |
cat ./build/meson-logs/meson-log.txt
+ - name: Run meson tests
+ id: tests
+ run: |
+ meson test -C build
+
+ - name: Print meson test log
+ if: steps.tests.outcome == 'failure'
+ run: |
+ cat ./build/meson-logs/testlog.txt
+
- name: Build with waf
+ id: build_waf
run: |
./ci/build-tumbleweed.sh waf
- name: Print waf log
- if: ${{ failure() }}
+ if: steps.build_waf.outcome == 'failure'
run: |
- cat ./build/config.log
+ cat ./build_waf/config.log
freebsd:
runs-on: macos-12 # until https://github.com/actions/runner/issues/385
@@ -195,16 +221,22 @@ jobs:
#
run: |
./ci/build-freebsd.sh
+ meson test -C build
- name: Print meson log
if: ${{ failure() }}
run: |
cat ./build/meson-logs/meson-log.txt
+ - name: Print meson test log
+ if: ${{ failure() }}
+ run: |
+ cat ./build/meson-logs/testlog.txt
+
- name: Print waf log
if: ${{ failure() }}
run: |
- cat ./build/config.log
+ cat ./build_waf/config.log
msys2:
runs-on: windows-latest
@@ -253,19 +285,31 @@ jobs:
vulkan:p
- name: Build with meson
+ id: build
run: |
./ci/build-msys2.sh meson
- name: Print meson log
- if: ${{ failure() }}
+ if: steps.build.outcome == 'failure'
+ run: |
+ cat ./build/meson-logs/meson-log.txt
+
+ - name: Run meson tests
+ id: tests
+ run: |
+ meson test -C build
+
+ - name: Print meson test log
+ if: steps.tests.outcome == 'failure'
run: |
- cat ./build_meson/meson-logs/meson-log.txt
+ cat ./build/meson-logs/testlog.txt
- name: Build with waf
+ id: build_waf
run: |
./ci/build-msys2.sh waf
- name: Print waf log
- if: ${{ failure() }}
+ if: steps.build_waf.outcome == 'failure'
run: |
- cat ./build/config.log
+ cat ./build_waf/config.log