build(deps): bump quinn-proto from 0.11.14 to 0.11.16 #92
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: Release | |
| # We have to use gtar on macOS because apple's tar is literally broken. | |
| # Yes, I know how stupid that sounds. But it's true: | |
| # https://github.com/actions/virtual-environments/issues/2619 | |
| on: | |
| push: | |
| tags: | |
| - "[0-9]+.[0-9]+.[0-9]+" | |
| - "[0-9]+.[0-9]+.[0-9]+-[A-Za-z]+.[0-9]+" | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # When getting Rust dependencies, retry on network error: | |
| CARGO_NET_RETRY: 10 | |
| # Use the local .curlrc | |
| CURL_HOME: . | |
| # Disable DFX telemetry | |
| DFX_TELEMETRY: "off" | |
| jobs: | |
| build_dfx: | |
| name: build_dfx (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| # We build a dynamic-linked linux binary because otherwise HSM support fails with: | |
| # Error: IO: Dynamic loading not supported | |
| matrix: | |
| include: | |
| - os: macos-15-intel | |
| target: x86_64-apple-darwin | |
| name: x86_64-darwin | |
| tar: gtar | |
| - os: macos-15 | |
| target: aarch64-apple-darwin | |
| name: aarch64-darwin | |
| tar: gtar | |
| - os: ubuntu-24.04 | |
| target: x86_64-unknown-linux-gnu | |
| name: x86_64-linux | |
| tar: tar | |
| - os: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| name: aarch64-linux | |
| tar: tar | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup environment variables | |
| run: | | |
| echo "RUSTFLAGS=--remap-path-prefix=${GITHUB_WORKSPACE}=/builds/dfinity" >> $GITHUB_ENV | |
| # GITHUB_REF_NAME will be something link 2353/merge for branch builds, which isn't great as a dfx version | |
| - name: Set dfx version (tag builds only) | |
| if: github.ref_type == 'tag' | |
| run: | | |
| echo "DFX_VERSION=$GITHUB_REF_NAME" >> $GITHUB_ENV | |
| echo "TARBALL_1_FILENAME=dfx-$GITHUB_REF_NAME-${{ matrix.name }}.tar.gz" >> $GITHUB_ENV | |
| echo "SHA256_1_FILENAME=dfx-$GITHUB_REF_NAME-${{ matrix.name }}.tar.gz.sha256" >> $GITHUB_ENV | |
| echo "TARBALL_2_FILENAME=dfx-${{ matrix.target }}.tar.gz" >> $GITHUB_ENV | |
| echo "SHA256_2_FILENAME=dfx-${{ matrix.target }}.tar.gz.sha256" >> $GITHUB_ENV | |
| # Remove pre-installed stable toolchain so it doesn't pollute the | |
| # rust-cache environment hash. macOS (and sometimes Linux) runner | |
| # images ship with varying stable versions, making the hash | |
| # non-deterministic and causing constant cache misses. | |
| - name: Remove pre-installed Rust stable toolchain | |
| run: rustup toolchain remove stable 2>/dev/null || true | |
| # This step also handles Rust-specific caching | |
| - name: Install Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache-shared-key: release | |
| - name: Build | |
| run: cargo build --locked --release | |
| - name: Check dynamically-linked libraries (macos) | |
| run: | | |
| ACTUAL="$(otool -L target/release/dfx | awk 'NR > 1{ print $1 }' | grep -v /System/Library/Frameworks | sort)" | |
| EXPECTED="$(printf '/usr/lib/libSystem.B.dylib\n/usr/lib/libc++.1.dylib\n/usr/lib/libiconv.2.dylib\n/usr/lib/libobjc.A.dylib' | sort)" | |
| echo "Dynamically-linked libraries:" | |
| echo " Actual:" | |
| echo "$ACTUAL" | sed 's/^/ /' | |
| if [ "$ACTUAL" != "$EXPECTED" ]; then | |
| echo " Expected:" | |
| echo "$EXPECTED" | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| if: contains(matrix.os, 'macos') | |
| - name: Check dynamically-linked libraries (ubuntu) | |
| run: | | |
| ACTUAL="$(ldd target/release/dfx | awk '{ print $1 }' | sort | awk -v d=" " '{s=(NR==1?s:s d)$0}END{printf "%s",s}')" | |
| if [[ "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]]; then | |
| EXPECTED="/lib64/ld-linux-x86-64.so.2 libc.so.6 libgcc_s.so.1 libm.so.6 libstdc++.so.6 linux-vdso.so.1" | |
| elif [[ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ]]; then | |
| EXPECTED="/lib/ld-linux-aarch64.so.1 libc.so.6 libgcc_s.so.1 libm.so.6 libstdc++.so.6 linux-vdso.so.1" | |
| else | |
| echo "Unsupported target: ${{ matrix.target }}" | |
| exit 1 | |
| fi | |
| echo "Dynamically-linked libraries:" | |
| echo " Target: ${{ matrix.target }}" | |
| echo " Actual: $ACTUAL" | |
| echo " Expected: $EXPECTED" | |
| if [ "$ACTUAL" != "$EXPECTED" ]; then | |
| exit 1 | |
| fi | |
| if: contains(matrix.os, 'ubuntu') | |
| - name: Strip binaries | |
| run: | | |
| cd target/release | |
| sudo chown -R $(whoami) . | |
| strip dfx | |
| if: contains(matrix.os, 'ubuntu') | |
| - name: Create tarball of binaries and sha256 of tarball | |
| if: github.ref_type == 'tag' | |
| run: | | |
| mkdir dfx-${{ matrix.target }} | |
| cp target/release/dfx dfx-${{ matrix.target }} | |
| cp LICENSE dfx-${{ matrix.target }} | |
| ${{ matrix.tar }} -zc -f ${{ env.TARBALL_2_FILENAME }} dfx-${{ matrix.target }} | |
| shasum -a 256 ${{ env.TARBALL_2_FILENAME }} > ${{ env.SHA256_2_FILENAME }} | |
| shasum -c ${{ env.SHA256_2_FILENAME }} | |
| ${{ matrix.tar }} -zcC target/release -f ${{ env.TARBALL_1_FILENAME }} dfx | |
| shasum -a 256 ${{ env.TARBALL_1_FILENAME }} > $SHA256_1_FILENAME | |
| shasum -c $SHA256_1_FILENAME | |
| - name: Upload Artifacts | |
| if: github.ref_type == 'tag' | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 | |
| with: | |
| name: dfx-artifacts-${{ hashFiles('rust-toolchain.toml') }}-${{ matrix.name }} | |
| path: | | |
| ${{ env.TARBALL_1_FILENAME }} | |
| ${{ env.SHA256_1_FILENAME }} | |
| ${{ env.TARBALL_2_FILENAME }} | |
| ${{ env.SHA256_2_FILENAME }} | |
| aggregate: | |
| name: build-dfx:required | |
| if: ${{ always() }} | |
| needs: [build_dfx] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: check build result | |
| if: ${{ needs.build_dfx.result != 'success' }} | |
| run: exit 1 | |
| gh-release: | |
| runs-on: ubuntu-latest | |
| if: github.ref_type == 'tag' | |
| needs: build_dfx | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup environment variables | |
| run: echo "VERSION=$GITHUB_REF_NAME" >> $GITHUB_ENV | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| pattern: dfx-artifacts-${{ hashFiles('rust-toolchain.toml') }}-* | |
| merge-multiple: true | |
| - name: Upload dfx tarballs and sha256 | |
| uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: dfx-*.tar.* | |
| file_glob: true | |
| tag: ${{ env.VERSION }} | |
| prerelease: true | |
| make_latest: false | |
| - name: Upload assets canister | |
| uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: src/distributed/assetstorage.{wasm.gz,did} | |
| file_glob: true | |
| tag: ${{ env.VERSION }} |