Skip to content

Commit 4eb0d7c

Browse files
committed
.github/workflows/ci.yml: cast testing net wider.
1 parent 5fc5cfe commit 4eb0d7c

File tree

1 file changed

+19
-37
lines changed

1 file changed

+19
-37
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
strategy:
1919
matrix:
20-
os: [ ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest ]
20+
os: [ ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-latest ]
2121

2222
steps:
2323
- uses: actions/checkout@v4
@@ -42,9 +42,21 @@ jobs:
4242
sysctl hw 2>/dev/null && echo --- || true
4343
env | sort
4444
45+
- name: Install Rust
46+
if: ${{ runner.os == 'Windows' && runner.arch == 'ARM64' }}
47+
shell: bash
48+
run: |
49+
if ! which cargo > /dev/null 2>&1; then
50+
curl -sSf -o rustup-init.exe https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe
51+
./rustup-init.exe --profile minimal --component clippy -y
52+
fi
53+
4554
- name: Rust
4655
shell: bash
4756
run: |
57+
if [ -d "$HOME/.cargo/bin" ] && ! which cargo > /dev/null 2>&1; then
58+
export PATH="$HOME/.cargo/bin:$PATH"
59+
fi
4860
rustc --version --verbose
4961
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
5062
cd bindings/rust
@@ -69,11 +81,11 @@ jobs:
6981
echo 'export RUST_MIN_STACK=$(($1 * 1024)); shift' >> ulimit-s
7082
echo 'exec "$@"' >> ulimit-s
7183
triplet=`rustc -vV | awk '/host:/ {print $2}' | tr 'a-z-' 'A-Z_'`
72-
stack_size=`[ $OSTYPE = "msys" ] && echo 65 || echo 56`
84+
stack_size=`[ $RUNNER_OS = "Windows" ] && echo 65 || echo 56`
7385
env BLST_TEST_NO_STD= \
7486
CARGO_TARGET_${triplet}_RUNNER="bash ulimit-s $stack_size" \
7587
cargo test --release
76-
if [ `uname -s` = "Linux" ]; then
88+
if [ $RUNNER_OS = "Linux" ]; then
7789
echo '--- test wasm32-wasip1'
7890
echo
7991
rustup target add wasm32-wasip1
@@ -97,8 +109,8 @@ jobs:
97109
echo '--- dry-run publish'
98110
echo
99111
./publish.sh --dry-run
100-
elif [ `uname -s` = "Darwin" ]; then
101-
if [ $HOSTTYPE = "arm64" ]; then
112+
elif [ $RUNNER_OS = "macOS" ]; then
113+
if [ $RUNNER_ARCH = "ARM64" ]; then
102114
echo '--- test x86_64-apple-darwin'
103115
echo
104116
rustup target add x86_64-apple-darwin
@@ -120,7 +132,7 @@ jobs:
120132
cargo test --no-run --release --target=aarch64-apple-ios
121133
cargo clean -p blst --release --target=aarch64-apple-ios
122134
echo
123-
elif [ $OSTYPE = "msys" ]; then
135+
elif [ $RUNNER_OS = "Windows" -a $RUNNER_ARCH = "X64" ]; then
124136
if which clang-cl > /dev/null 2>&1; then
125137
echo '-- test i686-pc-windows-msvc'
126138
echo
@@ -135,13 +147,6 @@ jobs:
135147
cargo test --release --target=x86_64-pc-windows-gnu
136148
cargo clean -p blst --release --target=x86_64-pc-windows-gnu
137149
echo
138-
echo '-- build aarch64-pc-windows-msvc'
139-
echo
140-
rustup target add aarch64-pc-windows-msvc
141-
cargo test --no-run --release --target=aarch64-pc-windows-msvc
142-
find target/aarch64-pc-windows-msvc -name blst-\*.exe -exec cp {} blst-arm-test.exe \; -quit
143-
cargo clean -p blst --release --target=aarch64-pc-windows-msvc
144-
echo
145150
fi
146151
echo
147152
echo '--- cargo clippy'
@@ -158,6 +163,7 @@ jobs:
158163
rm -rf ~/.cargo/registry/index/*/.cache
159164
160165
- name: Go
166+
if: ${{ runner.os != 'Windows' || runner.arch != 'ARM64' }}
161167
shell: bash
162168
run: |
163169
go version 2>/dev/null || exit 0
@@ -167,30 +173,6 @@ jobs:
167173
cd bindings/go
168174
go test -test.v
169175
170-
- uses: actions/upload-artifact@v4
171-
if: ${{ runner.os == 'Windows' }}
172-
with:
173-
name: blst-arm-test.exe
174-
path: bindings/rust/blst-arm-test.exe
175-
if-no-files-found: ignore
176-
177-
cargo-test-windows-on-arm:
178-
runs-on: ubuntu-latest
179-
needs: rust-n-go
180-
181-
steps:
182-
- uses: actions/download-artifact@v4
183-
with:
184-
name: blst-arm-test.exe
185-
186-
- name: wine-arm64
187-
uses: addnab/docker-run-action@v3
188-
with:
189-
registry: https://index.docker.io/v1/
190-
image: linaro/wine-arm64
191-
options: --volume ${{ github.workspace }}:/blst --network=none
192-
run: wine-arm64 cmd /c "cd \ && \blst\blst-arm-test.exe"
193-
194176
misc-ubuntu-latest:
195177
runs-on: ubuntu-latest
196178

0 commit comments

Comments
 (0)