Skip to content

Commit

Permalink
ci: enhance if-expressions and matrix settings
Browse files Browse the repository at this point in the history
  • Loading branch information
muzimuzhi committed Aug 9, 2024
1 parent 24793d1 commit 0fb196c
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,19 @@ jobs:
matrix:
include:
- runs-on: ubuntu-latest
shell: bash
diffs: "ctex/build/**/*.diff"
font-dir: /usr/share/fonts/truetype
shell: bash
tl-pkgs: ""
- runs-on: macos-14
shell: bash
diffs: "ctex/build/**/*.diff"
font-dir: /Library/Fonts
shell: bash
tl-pkgs: ""
- runs-on: windows-latest
shell: C:\msys64\usr\bin\bash.exe -e {0}
diffs: "ctex/build/**/*.fc"
font-dir: /c/Windows/Fonts
shell: C:\msys64\usr\bin\bash.exe -e {0}
# for `unzip` shipped with texlive
tl-pkgs: wintools.windows

Expand All @@ -178,9 +181,10 @@ jobs:
- uses: actions/checkout@v4

- name: Install TeX Live
timeout-minutes: 30 # fail fast
uses: teatimeguest/setup-texlive-action@v3
with:
packages: >-
packages: |
${{ env.TL_PACKAGES }}
${{ env.TL_EXTRA_PACKAGES }}
${{ matrix.tl-pkgs }}
Expand All @@ -193,22 +197,24 @@ jobs:
unzip -ojd ${{ matrix.font-dir }} "*OTC.zip" "*.ttc"
- name: Test ctex
id: test
working-directory: ./ctex
run: |
l3build check -q -H
l3build check -c test/config-cmap -q -H
l3build check -c test/config-contrib -q -H
- name: Get short commit SHA
if: failure()
# if-expression starting with "!" must be escaped,
# since "!" is reserved notation in YAML
if: ${{ !cancelled() && steps.test.outcome == 'failure' }}
run: |
echo "SHA_SHORT=$(git rev-parse --short=8 HEAD)" >> $GITHUB_ENV
- name: Upload test diffs
if: failure()
if: ${{ !cancelled() && steps.test.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: ctex-kit-diff-${{ env.SHA_SHORT }}
path: |
ctex/build/**/*.diff
ctex/build/**/*.fc
${{ matrix.diffs }}

0 comments on commit 0fb196c

Please sign in to comment.