Support Zig 0.14 #75
Workflow file for this run
This file contains hidden or 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: Build library and test programs | |
| on: [pull_request, push] | |
| env: | |
| SOLANA_ZIG_VERSION: v1.47.0 | |
| SOLANA_ZIG_DIR: solana-zig | |
| jobs: | |
| library: | |
| name: Build and test library | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/cache@v4 | |
| with: | |
| path: $SOLANA_ZIG_DIR | |
| key: solana-zig-$SOLANA_ZIG_VERSION | |
| - name: Download solana-zig compiler | |
| shell: bash | |
| run: ./install-solana-zig.sh $SOLANA_ZIG_DIR | |
| - name: Test library | |
| shell: bash | |
| run: | | |
| $SOLANA_ZIG_DIR/zig build test --summary all | |
| programs: | |
| name: Build and test programs | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| $SOLANA_ZIG_DIR | |
| key: solana-zig-${{ hashFiles('./program-test/Cargo.lock') }}-$SOLANA_ZIG_VERSION | |
| - name: Download solana-zig compiler | |
| shell: bash | |
| run: ./install-solana-zig.sh $SOLANA_ZIG_DIR | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.84.1 | |
| # took the workaround from https://github.com/sfackler/rust-openssl/issues/2149 | |
| - name: Set Perl environment variables | |
| if: runner.os == 'Windows' | |
| run: | | |
| echo "PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| echo "OPENSSL_SRC_PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| - name: Install build deps | |
| shell: bash | |
| run: ./program-test/install-build-deps.sh | |
| - name: Build and test program | |
| shell: bash | |
| run: ./program-test/test.sh |