Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,29 @@ jobs:
mode: walltime
token: ${{ secrets.CODSPEED_TOKEN }}

musl-build-check:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
runner: ubuntu-24.04
- target: aarch64-unknown-linux-musl
runner: codspeedhq-arm64-ubuntu-24.04

runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: moonrepo/setup-rust@v1
with:
targets: ${{ matrix.target }}

- name: Install musl tools
run: sudo apt-get update && sudo apt-get install -y musl-tools

- run: cargo build --locked --release --bin cargo-codspeed --target ${{ matrix.target }}

check:
runs-on: ubuntu-latest
if: always()
Expand All @@ -132,6 +155,7 @@ jobs:
- tests
- compat-integration-test-instrumentation
- compat-integration-test-walltime
- musl-build-check
steps:
- uses: re-actors/alls-green@release/v1
with:
Expand Down
60 changes: 41 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,39 @@ permissions:
contents: write

jobs:
build-musl-binaries:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
runner: ubuntu-24.04
- target: aarch64-unknown-linux-musl
runner: codspeedhq-arm64-ubuntu-24.04

runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: moonrepo/setup-rust@v1
with:
targets: ${{ matrix.target }}

- name: Install musl tools
run: sudo apt-get update && sudo apt-get install -y musl-tools

- run: cargo build --locked --release --bin cargo-codspeed --target ${{ matrix.target }}

- name: Upload binary as artifact
uses: actions/upload-artifact@v4
with:
name: cargo-codspeed-${{ matrix.target }}
path: ./target/${{ matrix.target }}/release/cargo-codspeed
if-no-files-found: error

publish:
needs: build-musl-binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -41,35 +73,25 @@ jobs:
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}

build-upload-binaries:
upload-binaries:
needs: publish
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
runner: ubuntu-24.04
- target: aarch64-unknown-linux-musl
runner: codspeedhq-arm64-ubuntu-24.04
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl

runs-on: ${{ matrix.runner }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download binary artifact
uses: actions/download-artifact@v4
with:
submodules: true
fetch-depth: 0
- uses: moonrepo/setup-rust@v1
with:
targets: ${{ matrix.target }}

- name: Install musl tools
run: sudo apt-get update && sudo apt-get install -y musl-tools

- run: cargo build --locked --release --bin cargo-codspeed --target ${{ matrix.target }}
name: cargo-codspeed-${{ matrix.target }}
path: ./target/${{ matrix.target }}/release

- name: Upload Release Asset
if: github.event_name != 'workflow_dispatch'
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading