From 978c0463461e38ae463ddb8d1dc39b14c5f965c5 Mon Sep 17 00:00:00 2001 From: gabriel-aranha-cw Date: Fri, 29 Nov 2024 13:55:59 -0300 Subject: [PATCH] a --- .github/workflows/build-binary.yml | 32 +++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-binary.yml b/.github/workflows/build-binary.yml index 11b844426..e148a0df5 100644 --- a/.github/workflows/build-binary.yml +++ b/.github/workflows/build-binary.yml @@ -24,12 +24,25 @@ env: jobs: build_binaries: - name: Build and upload + name: Build ${{ matrix.config.name }} binary runs-on: ubuntu-latest timeout-minutes: 45 + strategy: + fail-fast: false + matrix: + config: + - name: default + artifact_prefix: stratus + extra_features: "" + rustflags: "" + - name: profiling + artifact_prefix: stratus-prof + extra_features: ",jeprof" + rustflags: "-C force-frame-pointers=yes" + concurrency: - group: ${{ github.workflow }}-{{ github.run_id }} + group: ${{ github.workflow }}-${{ matrix.config.name }}-${{ github.run_id }} cancel-in-progress: true steps: @@ -54,27 +67,28 @@ jobs: - name: Install libsasl2-dev libssl-dev run: sudo apt-get update && sudo apt install -y build-essential pkg-config libssl-dev libsasl2-dev - - name: Build binaries + - name: Build binary run: | cargo build --release \ --bin stratus \ - --features "$FEATURES" + --features "${{ env.FEATURES }}${{ matrix.config.extra_features }}" env: CARGO_PROFILE_RELEASE_DEBUG: 1 TRACING_LOG_FORMAT: json NO_COLOR: 1 FEATURES: "${{ github.event.inputs.features || 'default' }}" + RUSTFLAGS: ${{ matrix.config.rustflags }} - - name: Upload stratus + - name: Upload binary uses: actions/upload-artifact@v4 - id: upload-str + id: upload-binary with: - name: stratus-${{ github.sha }} + name: ${{ matrix.config.artifact_prefix }}-${{ github.sha }} path: target/release/stratus if-no-files-found: error retention-days: ${{ env.RETENTION_DAYS }} - name: Print outputs run: | - echo "Artifact ID: ${{ steps.upload-str.outputs.artifact-id }} (stratus)" - echo "Artifact URL: ${{ steps.upload-str.outputs.artifact-url }} (stratus)" \ No newline at end of file + echo "Artifact ID: ${{ steps.upload-binary.outputs.artifact-id }} (${{ matrix.config.name }})" + echo "Artifact URL: ${{ steps.upload-binary.outputs.artifact-url }} (${{ matrix.config.name }})" \ No newline at end of file