Skip to content

Commit 4aa82c0

Browse files
authored
Merge pull request #15 from agaxia/master
CI: Run the `step-tests` workflow on macOS and Ubuntu.
2 parents 962d102 + 4946002 commit 4aa82c0

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/step-tests.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,23 @@ env:
4646

4747
jobs:
4848
step-tests:
49-
runs-on: ubuntu-latest
49+
runs-on: ${{ matrix.os }}
50+
51+
strategy:
52+
matrix:
53+
os: [macos-latest, ubuntu-latest]
5054

5155
steps:
5256
- uses: actions/checkout@v4
5357

54-
- name: Install dependencies
58+
- name: Install dependencies (macOS)
59+
if: startsWith(matrix.os, 'macos')
60+
run: |
61+
brew install cjson
62+
brew install redcode/zxe/z80insnclock
63+
64+
- name: Install dependencies (Ubuntu)
65+
if: startsWith(matrix.os, 'ubuntu')
5566
run: |
5667
curl -L https://zxe.io/scripts/add-zxe-apt-repo.sh | sudo sh
5768
sudo apt-get update
@@ -61,8 +72,9 @@ jobs:
6172
- name: Fetch test files
6273
run: |
6374
mkdir -p "${{ github.workspace }}/build/step-tests"
64-
curl -L $(curl -L -s "${{ env.TEST_FILES_QUERY_URL }}" | grep tarball_url | cut -d ":" -f 2,3 | tr -d '" ,') |
65-
gzip -cd | tar -C "${{ github.workspace }}/build/step-tests" --strip-components=2 -xf - --wildcards "${{ env.TEST_FILES_PATH }}"
75+
curl -L $(curl -sL "${{ env.TEST_FILES_QUERY_URL }}" | jq -r '.tarball_url') |
76+
gzip -cd |
77+
tar -C "${{ github.workspace }}/build/step-tests" --strip-components=2 -xf - $([[ $(tar --version | head -n 1 | cut -d " " -f 1) = tar ]] && echo --wildcards) "${{ env.TEST_FILES_PATH }}"
6678
6779
- name: Configure CMake
6880
run: >-

0 commit comments

Comments
 (0)