|
17 | 17 | steps: |
18 | 18 | - name: Checkout sources |
19 | 19 | uses: actions/checkout@v3 |
20 | | - - uses: Swatinem/rust-cache@v2 |
| 20 | + - uses: actions-rust-lang/setup-rust-toolchain@v1 |
21 | 21 | with: |
22 | | - workspaces: "pythnet/message_buffer -> target" |
23 | | - - uses: actions-rs/toolchain@v1 |
24 | | - with: |
25 | | - toolchain: 1.66.1 |
26 | | - components: rustfmt, clippy |
| 22 | + cache-workspaces: "pythnet/message_buffer -> target" |
27 | 23 | - name: Install Solana |
28 | 24 | run: | |
29 | 25 | wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb |
|
32 | 28 | echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH |
33 | 29 | - name: Install Anchor |
34 | 30 | run: | |
35 | | - cargo install --git https://github.com/coral-xyz/anchor --tag v0.27.0 anchor-cli --locked |
| 31 | + unset CARGO_UNSTABLE_SPARSE_REGISTRY |
| 32 | + unset CARGO_REGISTRIES_CRATES_IO_PROTOCOL |
| 33 | + # Anchor doesn't build with newer Rust |
| 34 | + cargo +1.66.1 install --git https://github.com/coral-xyz/anchor --tag v0.27.0 anchor-cli --locked |
36 | 35 | - name: Install g++ 12 |
37 | 36 | run: | |
38 | 37 | sudo apt-get install g++-12 |
|
50 | 49 | with: |
51 | 50 | run_install: true |
52 | 51 | - name: Build and generate IDLs |
53 | | - run: anchor build |
| 52 | + run: | |
| 53 | + unset CARGO_UNSTABLE_SPARSE_REGISTRY |
| 54 | + unset CARGO_REGISTRIES_CRATES_IO_PROTOCOL |
| 55 | + rustup override set 1.66.1 |
| 56 | + anchor build |
| 57 | + rustup override unset |
54 | 58 | - name: Copy anchor target files |
55 | 59 | run: cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/ |
56 | 60 | - name: Fix formatting (to avoid pre-commit failures) |
|
64 | 68 | run: cargo fmt --all -- --check |
65 | 69 | if: success() || failure() |
66 | 70 | - name: Cargo clippy |
67 | | - run: cargo clippy --tests -- --deny warnings |
68 | | - if: success() || failure() |
| 71 | + run: cargo clippy --all-targets -- --deny warnings |
0 commit comments