From 5b30e663ef8b7ed8bb1442c5178e1496b4ce1468 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Mon, 6 Jan 2025 18:30:37 -0800 Subject: [PATCH] ci: Upload failed MacVim tests artifacts, misc improvements Add new step to upload MacVim test results when we have failed tests. The xcresult folder can be opened in Xcode for inspection to help understand what went wrong. Also, fix the ordering so failed Vim GUI test artifacts can be uploaded as well. When configuring Vim, be explicit to not build with sodium/gettext for the non-publish builds. This makes sure that even if the CI environment somehow has them installed by default, we won't use them by mistake. Those installed packages would be built for a different OS target anyway and throw out warnings (the ones we bundle with MacVim are custom built to target the proper OS versions). --- .../actions/test_macvim_artifacts/action.yml | 26 +++++++++++++++++++ .github/workflows/ci-macvim.yaml | 5 ++++ 2 files changed, 31 insertions(+) create mode 100644 .github/actions/test_macvim_artifacts/action.yml diff --git a/.github/actions/test_macvim_artifacts/action.yml b/.github/actions/test_macvim_artifacts/action.yml new file mode 100644 index 0000000000..e02eec625e --- /dev/null +++ b/.github/actions/test_macvim_artifacts/action.yml @@ -0,0 +1,26 @@ +# This is a clone of test_artifacts for MacVim-specific files +name: 'test_macvim_artifacts' +description: "Upload failed MacVim test artifacts" +runs: + using: "composite" + steps: + - name: Upload failed tests + uses: actions/upload-artifact@v4 + with: + # Name of the artifact to upload. + name: ${{ github.workflow }}-${{ github.job }}-${{ join(matrix.*, '-') }}-failed-macvim-tests + + # A file, directory or wildcard pattern that describes what + # to upload. + path: | + /Users/runner/Library/Developer/Xcode/DerivedData/MacVim-*/Logs/Test/*.xcresult + # The desired behavior if no files are found using the + # provided path. + if-no-files-found: ignore + + # Duration after which artifact will expire in days. 0 means + # using repository settings. + retention-days: 0 + + # If true, an artifact with a matching name will be deleted + overwrite: true diff --git a/.github/workflows/ci-macvim.yaml b/.github/workflows/ci-macvim.yaml index 33552476c8..4e2c103632 100644 --- a/.github/workflows/ci-macvim.yaml +++ b/.github/workflows/ci-macvim.yaml @@ -207,6 +207,7 @@ jobs: else CONFOPT+=( --disable-sparkle # Disable Sparkle for testing that this flag builds and works + --enable-nls=no --enable-libsodium=no # Disable gettext and libsodium unless we built them ourselves for publish ) fi if ${{ matrix.legacy == true }}; then @@ -354,6 +355,10 @@ jobs: run: | make ${MAKE_BUILD_ARGS} -C src macvim-tests + - name: Upload failed MacVim test results + if: ${{ !cancelled() && failure() }} + uses: ./.github/actions/test_macvim_artifacts + - name: Build Vim test binaries run: | # Build the unit test binaries first. With link-time-optimization they take some time to link. Running them