diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ef3f18f..9f469bb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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: @@ -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' }} diff --git a/build.rs b/build.rs index 68755c1..59594ff 100644 --- a/build.rs +++ b/build.rs @@ -22,9 +22,13 @@ fn main() { let define_value = match target_env { // srsly. There must be a better way. 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), + Ok(s) if s == "x86_64-pc-windows-msvc" => "#define RAPIDJSON_SSE42".into(), + Ok(s) if s == "aarch64-apple-darwin" => "#define RAPIDJSON_NEON".into(), + 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();