-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: tidy up CI, add release workflow (#6)
- use ubuntu-latest; deduplicate apt installation - rework CI matrix - build for musl, not glibc - add release workflow to create the binary package - don't use mold (not supported by rust cross) - enable LTO & strip on release builds
- Loading branch information
Showing
5 changed files
with
85 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
# useful for testing | ||
#push: | ||
# branches: | ||
# - misc/ci-auto-release | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
binary: | ||
strategy: | ||
matrix: | ||
include: | ||
- build: x86_64-musl | ||
host: ubuntu-latest | ||
target: x86_64-unknown-linux-musl | ||
rust: stable | ||
runs-on: ${{ matrix.host }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: "${{matrix.build}}" | ||
#- name: install packages (ubuntu) | ||
# if: startsWith(matrix.host, 'ubuntu') | ||
# run: scripts/install-ubuntu-packages | ||
- uses: taiki-e/upload-rust-binary-action@v1 | ||
id: build | ||
with: | ||
bin: qcp | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
target: ${{ matrix.target }} | ||
include: README.md,LICENSE,CHANGELOG.md | ||
leading-dir: true | ||
tar: unix | ||
zip: windows | ||
# dry_run: true # when testing the workflow | ||
# Uploading the artifact is useful when testing the workflow in dry-run mode | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: binary-${{ matrix.target }} | ||
path: ${{ steps.build.outputs.archive }}.tar.gz |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh -e | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
sudo apt-get update | ||
sudo apt-get -y --no-install-recommends install capnproto musl-tools |