Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-aranha-cw committed Nov 29, 2024
1 parent f79b3b3 commit 978c046
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/build-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)"
echo "Artifact ID: ${{ steps.upload-binary.outputs.artifact-id }} (${{ matrix.config.name }})"
echo "Artifact URL: ${{ steps.upload-binary.outputs.artifact-url }} (${{ matrix.config.name }})"

0 comments on commit 978c046

Please sign in to comment.