|
26 | 26 | - { name: linux-x86 , target: i686-unknown-linux-gnu , os: ubuntu-latest , use-cross: true } |
27 | 27 | - { name: windows-x64 , target: x86_64-pc-windows-msvc , os: windows-latest } |
28 | 28 | - { name: windows-x86 , target: i686-pc-windows-msvc , os: windows-latest } |
| 29 | + - { name: macos-arm64 , target: aarch64-apple-darwin , os: macos-latest } |
29 | 30 | - { name: macos-x64 , target: x86_64-apple-darwin , os: macos-latest } |
30 | 31 |
|
31 | 32 | env: |
@@ -121,34 +122,38 @@ jobs: |
121 | 122 | esac |
122 | 123 |
|
123 | 124 | - name: Build C library |
124 | | - if: "!contains(matrix.job.os, 'windows')" # Requires an additional adapted Makefile for `cl.exe` compiler |
| 125 | + if: ${{ !contains(matrix.job.os, 'windows') }} # Requires an additional adapted Makefile for `cl.exe` compiler |
125 | 126 | run: make.sh CFLAGS="-Werror" -j |
126 | 127 |
|
127 | 128 | - name: Build wasm library |
| 129 | + if: ${{ !matrix.job.use-cross && matrix.job.name != 'macos-arm64' }} # Not used |
128 | 130 | run: script/build-wasm |
129 | 131 |
|
130 | 132 | - name: Build CLI |
131 | 133 | run: $BUILD_CMD build --release --target=${{ matrix.job.target }} |
132 | 134 |
|
133 | 135 | - name: Fetch fixtures |
| 136 | + if: ${{ matrix.job.name != 'macos-arm64' }} # Not used |
134 | 137 | run: script/fetch-fixtures |
135 | 138 |
|
136 | 139 | - name: Generate fixtures |
| 140 | + if: ${{ matrix.job.name != 'macos-arm64' }} # Can't natively run CLI on runner's host |
137 | 141 | run: script/generate-fixtures |
138 | 142 |
|
139 | 143 | - name: Generate WASM fixtures |
140 | | - if: "!matrix.job.use-cross" |
| 144 | + if: ${{ !matrix.job.use-cross && matrix.job.name != 'macos-arm64' }} # Not used |
141 | 145 | run: script/generate-fixtures-wasm |
142 | 146 |
|
143 | 147 | - name: Run main tests |
| 148 | + if: ${{ matrix.job.name != 'macos-arm64' }} # Can't natively run CLI on runner's host |
144 | 149 | run: $BUILD_CMD test --target=${{ matrix.job.target }} |
145 | 150 |
|
146 | 151 | - name: Run wasm tests |
147 | | - if: "!matrix.job.use-cross" # TODO: Install Emscripten into custom cross images |
| 152 | + if: ${{ !matrix.job.use-cross && matrix.job.name != 'macos-arm64' }} # Not used |
148 | 153 | run: script/test-wasm |
149 | 154 |
|
150 | 155 | - name: Run benchmarks |
151 | | - if: "!matrix.job.use-cross" # It doesn't make sense to benchmark something in an emulator |
| 156 | + if: ${{ !matrix.job.use-cross && matrix.job.name != 'macos-arm64' }} # Cross-compiled benchmarks make no sense |
152 | 157 | run: $BUILD_CMD bench benchmark -p tree-sitter-cli --target=${{ matrix.job.target }} |
153 | 158 |
|
154 | 159 | - name: Upload CLI artifact |
|
0 commit comments