|
1 | | -name: Build and test hello-world program |
| 1 | +name: Main |
2 | 2 |
|
3 | | -on: [pull_request, push] |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - 'main' |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - 'main' |
4 | 10 |
|
5 | 11 | env: |
6 | | - SOLANA_ZIG_VERSION: v1.43.0 |
| 12 | + SOLANA_ZIG_VERSION: v1.47.0 |
7 | 13 | SOLANA_ZIG_DIR: solana-zig |
8 | 14 |
|
9 | 15 | jobs: |
10 | 16 | unit-test: |
11 | | - name: Run helloworld unit tests |
| 17 | + name: Unit tests |
12 | 18 | strategy: |
13 | 19 | matrix: |
14 | 20 | os: [ubuntu-latest, macos-latest, windows-latest] |
|
35 | 41 | $SOLANA_ZIG_DIR/zig build test --summary all --verbose |
36 | 42 |
|
37 | 43 | integration-test: |
38 | | - name: Run helloworld integration tests |
| 44 | + name: Integration tests |
39 | 45 | strategy: |
40 | 46 | matrix: |
41 | 47 | os: [ubuntu-latest, macos-latest, windows-latest] |
|
62 | 68 | - name: Install Rust |
63 | 69 | uses: dtolnay/rust-toolchain@master |
64 | 70 | with: |
65 | | - toolchain: 1.78.0 |
| 71 | + toolchain: 1.86.0 |
| 72 | + |
| 73 | + # took the workaround from https://github.com/sfackler/rust-openssl/issues/2149 |
| 74 | + - name: Set Perl environment variables |
| 75 | + if: runner.os == 'Windows' |
| 76 | + run: | |
| 77 | + echo "PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 |
| 78 | + echo "OPENSSL_SRC_PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 |
| 79 | +
|
| 80 | + - name: Setup openssl on Windows |
| 81 | + if: runner.os == 'Windows' |
| 82 | + shell: bash |
| 83 | + run: | |
| 84 | + cat > vcpkg.json <<EOL |
| 85 | + { |
| 86 | + "dependencies": ["openssl"], |
| 87 | + "overrides": [ |
| 88 | + { |
| 89 | + "name": "openssl", |
| 90 | + "version": "3.4.1" |
| 91 | + } |
| 92 | + ], |
| 93 | + "builtin-baseline": "5ee5eee0d3e9c6098b24d263e9099edcdcef6631" |
| 94 | + } |
| 95 | + EOL |
| 96 | + vcpkg install --triplet x64-windows-static-md |
| 97 | + rm vcpkg.json |
| 98 | + echo "OPENSSL_LIB_DIR=$PWD/vcpkg_installed/x64-windows-static-md/lib" >> $GITHUB_ENV |
| 99 | + echo "OPENSSL_INCLUDE_DIR=$PWD/vcpkg_installed/x64-windows-static-md/include" >> $GITHUB_ENV |
66 | 100 |
|
67 | 101 | - name: Install build deps |
68 | 102 | shell: bash |
|
73 | 107 | run: ./program-test/test.sh |
74 | 108 |
|
75 | 109 | cli-test: |
76 | | - name: Run helloworld CLI tests |
| 110 | + name: CLI tests |
77 | 111 | if: false |
78 | 112 | strategy: |
79 | 113 | matrix: |
@@ -101,7 +135,7 @@ jobs: |
101 | 135 | - name: Install Rust |
102 | 136 | uses: dtolnay/rust-toolchain@master |
103 | 137 | with: |
104 | | - toolchain: 1.78.0 |
| 138 | + toolchain: 1.86.0 |
105 | 139 |
|
106 | 140 | - name: Install Rust build deps |
107 | 141 | shell: bash |
|
0 commit comments