Skip to content

Commit

Permalink
ci: release for all platforms (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah authored Oct 5, 2024
1 parent 25a6d84 commit 10f9a44
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
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"]

0 comments on commit 10f9a44

Please sign in to comment.