Initial setup #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Rust CI" | |
on: | |
pull_request: | |
jobs: | |
build: | |
name: cargo build | |
runs-on: [ubuntu-latest] | |
container: | |
image: nvidia/cuda:11.8.0-devel-ubuntu22.04 | |
env: | |
BELLMAN_CUDA_DIR: ${{ github.workspace }}/bellman-cuda | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install build dependencies | |
run: apt update && apt install -y pkg-config libssl-dev libclang-dev gcc g++ curl jq | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly-2022-08-23 | |
# Remove default `-D warnings`. | |
rustflags: "" | |
- name: Prepare bellman-cuda directory | |
shell: bash | |
# Curl ugliness is required because gh can't work with authentication: https://github.com/cli/cli/issues/2680. | |
run: | | |
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')) | |
curl --silent -L "${release[1]}" --output bellman-cuda-source.tar.gz | |
curl --silent -L "${release[2]}" --output bellman-cuda.tar.gz | |
mkdir -p bellman-cuda | |
tar xvfz bellman-cuda.tar.gz -C ./bellman-cuda | |
tar xvfz bellman-cuda-source.tar.gz -C ./bellman-cuda --strip-components=1 --wildcards \*/src/ | |
# TODO: Right now we run tests in a separate workflow on the GPU runners, | |
# and only for some packages, since presumably `gpu-ffi` or `gpu-prover` crates | |
# are causing link-time errors when compiled with `--tests`. | |
- run: cargo build --verbose | |
formatting: | |
name: cargo fmt | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt | |
- name: Rustfmt Check | |
uses: actions-rust-lang/rustfmt@v1 |