From 22adbbe8a8104bff1258be723aadfb110ef74dad Mon Sep 17 00:00:00 2001 From: Daniel Sukoneck Date: Thu, 7 Nov 2024 10:26:18 -0700 Subject: [PATCH 1/2] revert static-link and build in container --- .github/workflows/release.yaml | 44 ++++++++++++++++------------------ 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a356a36..4b007e0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -51,6 +51,8 @@ jobs: needs: extract-version if: ${{ github.event.inputs.build-binary == 'true' || github.event_name == 'push'}} # when manually triggered or version tagged runs-on: ${{ matrix.configs.runner }} + container: + image: ubuntu:22.04 env: VERSION: ${{ needs.extract-version.outputs.VERSION }} permissions: @@ -59,39 +61,35 @@ jobs: strategy: matrix: configs: - - target: x86_64-unknown-linux-musl + - target: x86_64-unknown-linux-gnu runner: warp-ubuntu-latest-x64-16x steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Run WarpBuilds/rust-cache - uses: WarpBuilds/rust-cache@v2 - with: - cache-on-failure: true + - uses: actions/checkout@v4 - - name: Prepare output filename - run: | - OUTPUT_FILENAME="rbuilder-${VERSION}-${{ matrix.configs.target }}.tar.gz" - echo "OUTPUT_FILENAME=$OUTPUT_FILENAME" >> $GITHUB_ENV - echo "Filename: ${OUTPUT_FILENAME}" + - uses: WarpBuilds/rust-cache@v2 - - uses: taiki-e/install-action@cross + - name: Prepare filename + run: echo "OUTPUT_FILENAME=rbuilder-${VERSION}-${{ matrix.configs.target }}" >> $GITHUB_ENV - name: Build binary - run: cross build --release --target ${{ matrix.configs.target }} - - - name: Prepare artifacts run: | - mkdir -p artifacts - tar -czf "artifacts/${OUTPUT_FILENAME}" -C target/${{ matrix.configs.target }}/release rbuilder - - - name: Upload artifacts - uses: actions/upload-artifact@v4.3.1 + apt-get update + apt-get install -y \ + curl \ + build-essential \ + pkg-config \ + libssl-dev \ + protobuf-compiler + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . $HOME/.cargo/env + cargo build --release --target ${{ matrix.configs.target }} + + - name: Upload artifact + uses: actions/upload-artifact@v4 with: name: ${{ env.OUTPUT_FILENAME }} - path: artifacts/${{ env.OUTPUT_FILENAME }} + path: target/${{ matrix.configs.target }}/release/rbuilder draft-release: name: Draft release From 9fe746760d77a0e8e0132a4b91b753c1c175306b Mon Sep 17 00:00:00 2001 From: Daniel Sukoneck Date: Thu, 7 Nov 2024 10:31:55 -0700 Subject: [PATCH 2/2] add missing package --- .github/workflows/release.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4b007e0..f1a6254 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -76,10 +76,11 @@ jobs: run: | apt-get update apt-get install -y \ - curl \ build-essential \ - pkg-config \ + curl \ + libclang-dev \ libssl-dev \ + pkg-config \ protobuf-compiler curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y . $HOME/.cargo/env