Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: release for all platforms #9

Merged
merged 1 commit into from
Oct 5, 2024
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
28 changes: 28 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release
on:
workflow_dispatch:

jobs:
build:
name: Build the code for each platform
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- uses: mlugg/[email protected]
with:
version: 0.13.0
- name: Cache cargo dependencies
uses: Swatinem/[email protected]
# - name: Install mingw
# run: sudo apt-get install -y mingw-w64

- name: Install cargo-zigbuild
run: cargo install --locked [email protected]

- name: Cargo zigbuild
run: |
cargo zigbuild \
--target x86_64-unknown-linux-musl \
--target aarch64-unknown-linux-musl \
--target x86_64-pc-windows-gnu \
--all
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,10 @@ opt-level = 1
[profile.dev.package."*"]
# Seems to cause crashes on mac on opt-level 3
opt-level = 2

# What we use when producing artifacts to distribute
[profile.artifact]
inherits = "release"
lto = true
strip = true
debug = false
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
channel = "1.81.0" # See workspace Cargo.toml
components = ["rust-src"]
profile = "default"
targets = ["x86_64-pc-windows-msvc", "x86_64-unknown-linux-musl", "aarch64-unknown-linux-musl", "aarch64-apple-darwin"]
targets = ["x86_64-pc-windows-gnu", "x86_64-unknown-linux-musl", "aarch64-unknown-linux-musl", "aarch64-apple-darwin"]