-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring, bug fixes and improved CI w/ cross compiling (#12)
- Loading branch information
1 parent
4613daa
commit 85165c6
Showing
29 changed files
with
2,723 additions
and
382 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- released | ||
- prereleased | ||
|
||
jobs: | ||
test-cross: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- x86_64-unknown-linux-musl | ||
- s390x-unknown-linux-gnu | ||
- aarch64-unknown-linux-musl | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install cross | ||
run: cargo install cross --git https://github.com/cross-rs/cross --rev 6d097fb | ||
|
||
- name: Build | ||
run: cross build --target ${{ matrix.target }} --release -vv | ||
|
||
- name: Test | ||
run: cross test --target ${{ matrix.target }} --release -vv | ||
|
||
test-wasm32-emscripten: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build: [static, shared] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: wasm32-unknown-emscripten | ||
|
||
- name: Install build deps | ||
run: sudo apt install nasm gcc-multilib | ||
|
||
- name: Install Emscripten | ||
uses: mymindstorm/setup-emsdk@v14 | ||
|
||
- name: Build | ||
run: cargo build --target wasm32-unknown-emscripten --no-default-features --features ${{ matrix.build }} | ||
|
||
test-native: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-13 # x86_64 | ||
- macos-14 # arm | ||
- windows-latest | ||
- ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install nasm | ||
if: runner.os != 'macOS' | ||
uses: ilammy/setup-nasm@v1 | ||
|
||
- name: Set MSVC developer prompt | ||
if: runner.os == 'Windows' | ||
uses: ilammy/msvc-dev-cmd@v1.6.0 | ||
|
||
- name: Install build deps (OSX) | ||
if: runner.os == 'macOS' | ||
run: brew install automake autoconf coreutils libtool nasm | ||
|
||
- name: Test (shared) | ||
run: cargo test --no-default-features --features shared --lib --release -vv | ||
|
||
- name: Test (static) | ||
run: | | ||
cargo clean # ensure we're starting fresh, no funny business | ||
cargo test --no-default-features --features static --release -vv |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,11 +1,25 @@ | ||
[workspace] | ||
members = [ | ||
"isal-sys", | ||
"isal-rs" | ||
] | ||
|
||
[profile.release] | ||
lto = "fat" | ||
codegen-units = 1 | ||
opt-level = 3 | ||
debug = false | ||
[package] | ||
name = "isal-rs" | ||
version = "0.1.0+62519d9" | ||
edition = "2021" | ||
|
||
[lib] | ||
name = "isal" | ||
|
||
[features] | ||
default = ["static"] | ||
static = ["isal-sys/static"] | ||
shared = ["isal-sys/shared"] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
[dependencies] | ||
isal-sys = { path = "isal-sys"} | ||
|
||
[dev-dependencies] | ||
criterion = "0.3" | ||
md5 = "0.7.0" | ||
|
||
[[bench]] | ||
name = "igzip" | ||
path = "benches/igzip.rs" | ||
harness = false |
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 |
---|---|---|
@@ -1,2 +1,15 @@ | ||
[build] | ||
pre-build = ["apt update && apt install -y llvm-dev libclang-dev clang"] # required by cbindgen | ||
[target.x86_64-unknown-linux-musl] | ||
pre-build = [ | ||
"apt update", | ||
"apt install -y nasm" | ||
] | ||
[target.s390x-unknown-linux-gnu] | ||
pre-build = [ | ||
"apt update", | ||
"apt install -y nasm" | ||
] | ||
[target.aarch64-unknown-linux-musl] | ||
pre-build = [ | ||
"apt update", | ||
"apt install -y nasm" | ||
] |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.