Skip to content

Commit

Permalink
Build for mac m1 and arm64-based linux (#7)
Browse files Browse the repository at this point in the history
* Build for mac m1 and arm64-based linux

* Fix artifacts

* Use rpath=true

* don't run otool
  • Loading branch information
poszu authored Mar 6, 2023
1 parent 3af1400 commit 146d4d7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,27 @@ jobs:
- os: ubuntu-20.04
dylib: libpost.so
staticlib: libpost.a
- os: ubuntu-latest
dylibn: libpost.so

- os: ubuntu-22.04
dylib: libpost.so
staticlib: libpost.a
- os: macos-latest

- os: [self-hosted, linux, arm64]
dylib: libpost.so
staticlib: libpost.a
rustflags: --cfg=aes_armv8
artifact-name: linux-arm64

- os: [self-hosted, macos, arm64]
dylib: libpost.dylib
staticlib: libpost.a
rustflags: --cfg=aes_armv8
artifact-name: macos-m1

- os: macos-latest
dylib: libpost.dylib
staticlib: libpost.a

- os: windows-latest
dylib: post.dll
staticlib: post.lib
Expand All @@ -99,13 +113,13 @@ jobs:
profile: minimal
toolchain: nightly
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly build --profile release-clib -p post
- run: cd ffi && cargo build --profile release-clib
env:
RUSTFLAGS: ${{ matrix.rustflags }}
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: libpost-${{ matrix.os }}
name: libpost-${{ matrix.artifact-name || matrix.os }}
path: |
ffi/prover.h
target/release-clib/${{ matrix.dylib }}
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ harness = false
inherits = "release"
strip = true
lto = true
rpath = true
4 changes: 3 additions & 1 deletion ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[package]
name = "post"
name = "post-cbindings"
version = "0.1.0"
edition = "2021"


[lib]
name = "post"
crate_type = ["staticlib", "cdylib"]

[dependencies]
Expand Down

0 comments on commit 146d4d7

Please sign in to comment.