Skip to content

Commit e254d72

Browse files
committed
fixes from Robert
1 parent 2ab4b92 commit e254d72

File tree

1 file changed

+9
-32
lines changed

1 file changed

+9
-32
lines changed

.github/workflows/test-gpu.yaml

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
- main
77
pull_request:
88

9+
permissions:
10+
contents: read
11+
packages: read
12+
actions: read
13+
914
jobs:
1015
zksync-airbender-build:
1116
runs-on: [ ubuntu-latest ]
@@ -16,62 +21,34 @@ jobs:
1621
container:
1722
image: nvidia/cuda:${{ matrix.cuda }}
1823
env:
19-
BELLMAN_CUDA_DIR: ${{ github.workspace }}/bellman-cuda
24+
RUST_TOOLCHAIN: nightly-2025-03-15
2025
steps:
2126
- name: Prepare environment
2227
env:
2328
DEBIAN_FRONTEND: noninteractive
2429
run: |
25-
apt update && apt install -y \
26-
pkg-config libclang-dev build-essential lldb lld \
27-
clang openssl libssl-dev gcc g++ wget curl jq
30+
apt update && apt install -y cmake git jq libssl-dev pkg-config wget
2831
echo "/usr/local/nvidia/bin:/usr/local/cuda/bin" >> $GITHUB_PATH
2932
3033
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3
3134

3235
- name: Setup rustup
3336
run: |
34-
wget -q -O - https://sh.rustup.rs | bash -s -- -y
37+
wget -q -O - https://sh.rustup.rs | bash -s -- -y --default-toolchain $RUST_TOOLCHAIN --profile minimal
3538
echo "${HOME}/.cargo/bin" >> "${GITHUB_PATH}"
3639
echo "export PATH=\"$HOME/.cargo/bin:\$PATH\"" >> "${HOME}/.bash_profile"
3740
38-
- name: Setup CMake
39-
run: |
40-
curl -LO https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3-linux-x86_64.sh && \
41-
chmod +x cmake-3.24.3-linux-x86_64.sh && \
42-
./cmake-3.24.3-linux-x86_64.sh --skip-license --prefix=/usr/local
43-
44-
- name: Prepare bellman-cuda directory
45-
shell: bash
46-
# Curl ugliness is required because gh can't work with authentication: https://github.com/cli/cli/issues/2680.
47-
run: |
48-
release=($(curl --silent https://api.github.com/repos/matter-labs/era-bellman-cuda/releases | jq -r '.[0] | .name, .tarball_url, .assets[0].browser_download_url'))
49-
curl --silent -L "${release[1]}" --output bellman-cuda-source.tar.gz
50-
curl --silent -L "${release[2]}" --output bellman-cuda.tar.gz
51-
mkdir -p bellman-cuda
52-
tar xvfz bellman-cuda.tar.gz -C ./bellman-cuda
53-
tar xvfz bellman-cuda-source.tar.gz -C ./bellman-cuda --strip-components=1 --wildcards \*/src/
54-
55-
- name: Check CMake version
56-
run: |
57-
cmake --version
58-
5941
- name: Check CUDA version
6042
run: |
6143
nvcc --version
6244
63-
- name: Setup rust
64-
run: |
65-
rustup set profile minimal
66-
rustup toolchain install nightly-2025-05-24
67-
rustup default nightly-2025-05-24
6845
6946
- name: Build tests and copy binary to a separate dir
7047
shell: bash
7148
run: |
7249
mkdir artifacts
7350
CUDAARCHS=80 CARGO_TARGET_DIR=./build \
74-
cargo +nightly-2025-05-24 test -p ${{ matrix.package }} --no-run --release --message-format=json -q \
51+
cargo test -p ${{ matrix.package }} --no-run --release --message-format=json -q \
7552
| jq -r 'select(.executable != null) | .executable' \
7653
| while read binary; do
7754
cp "$binary" artifacts/${{ matrix.package }}

0 commit comments

Comments
 (0)