Skip to content

Commit

Permalink
more rectify build
Browse files Browse the repository at this point in the history
  • Loading branch information
djellemah committed May 4, 2024
1 parent 1c65e0a commit 2a10c70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,14 @@ jobs:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
- target: x86_64-pc-windows-msvc
runs-on: windows-latest
simd-def: RAPIDJSON_SSE42
# - target: x86_64-unknown-linux-musl
# runs-on: ubuntu-latest
- target: x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
simd-def: RAPIDJSON_SSE42
- target: arm64e-apple-darwin
- target: aarch64-apple-darwin
runs-on: macos-latest
simd-def: RAPIDJSON_NEON

runs-on: ${{ matrix.runs-on }}
steps:
Expand All @@ -59,8 +56,6 @@ jobs:
- run: rustup default nightly
- name: compile
run: cargo build --release
env:
${{ matrix.simd-def }}: true

- name: upload bin to release
if: ${{ runner.os != 'Windows' }}
Expand Down
6 changes: 5 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ fn main() {
Ok(s) if s == "x86_64-unknown-linux-gnu" => "#define RAPIDJSON_SSE42".into(),
Ok(s) if s == "x86_64-pc-windows-gnu" => "#define RAPIDJSON_SSE42".into(),
Ok(s) if s == "arm64e-apple-darwin"=> "#define RAPIDJSON_NEON".into(),
wut => format!("// whaddya mean {:?}", wut),
wut => {
let msg = format!("rapidjson SIMD not turned on because we don't know how to do that for target triple {:?}", wut);
println!("cargo::warning={msg}");
format!("// whaddya mean {:?}", wut)
},
};
if option_env!("RAPIDJSON_SSE42").is_some() {
std::fs::write(&dest_path, define_value).unwrap();
Expand Down

0 comments on commit 2a10c70

Please sign in to comment.