diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e299d3..f1029fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,7 @@ jobs: run: cargo test - name: Trim cache run: | - cargo install --force cargo-cache + which cargo-cache || cargo install cargo-cache cargo cache trim -l 1G simd_test: @@ -71,7 +71,46 @@ jobs: run: cargo test --features simd - name: Trim cache run: | - cargo install --force cargo-cache + which cargo-cache || cargo install cargo-cache + cargo cache trim -l 1G + + # cross compile from x86 mac to arm64, this is to make sure universal2 + # release will build without error + mac_cross_build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: mac-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} + restore-keys: | + mac-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} + mac-${{ runner.os }}-cargo- + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-${{ env.RUST_TC_NIGHTLY_VER }} + target: aarch64-apple-darwin + profile: minimal + default: true + - name: Build binary - universal2 + env: + DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer + MACOSX_DEPLOYMENT_TARGET: '10.9' + run: | + # set SDKROOT for C dependencies + export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) + cd roapi-http && \ + cargo build --bin roapi-http --target aarch64-apple-darwin + - name: Trim cache + run: | + which cargo-cache || cargo install cargo-cache cargo cache trim -l 1G docker_build: diff --git a/Cargo.lock b/Cargo.lock index ddaecf1..c549915 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -585,7 +585,7 @@ dependencies = [ [[package]] name = "columnq-cli" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "clap", @@ -2224,7 +2224,7 @@ dependencies = [ [[package]] name = "roapi-http" -version = "0.4.2" +version = "0.4.3" dependencies = [ "actix-cors", "actix-http", @@ -2743,18 +2743,18 @@ checksum = "dc725476a1398f0480d56cd0ad381f6f32acf2642704456f8f59a35df464b59a" [[package]] name = "snmalloc-rs" -version = "0.2.27" +version = "0.2.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5a6194d59b08fc87381e7c8a04ab4ab9967282b00f409bb742e08f3514ed0b" +checksum = "36acaace2719c972eab3ef6a6b3aee4495f0bf300f59715bb9cff6c5acf4ae20" dependencies = [ "snmalloc-sys", ] [[package]] name = "snmalloc-sys" -version = "0.2.27" +version = "0.2.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9518813a25ab2704a6df4968f609aa6949705409b6a854dcc87018d12961cbc8" +checksum = "35a7e6e7d5fe756bee058ddedefc7e0a9f9c8dbaa9401b48ed3c17d6578e40b5" dependencies = [ "cmake", ] diff --git a/columnq-cli/Cargo.toml b/columnq-cli/Cargo.toml index d385ef9..b295982 100644 --- a/columnq-cli/Cargo.toml +++ b/columnq-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "columnq-cli" -version = "0.1.2" +version = "0.1.3" homepage = "https://github.com/roapi/roapi" license = "MIT" readme = "README.md" @@ -14,7 +14,7 @@ path = "src/main.rs" [dependencies] columnq = { path = "../columnq", version = "0", default-features = false } # for datafusion optimization -snmalloc-rs = { version = "0.2", features= ["cache-friendly"], optional = true } +snmalloc-rs = { version = "0.2", optional = true } serde_json = "*" log = "0" diff --git a/roapi-http/Cargo.toml b/roapi-http/Cargo.toml index 89c944c..995393b 100644 --- a/roapi-http/Cargo.toml +++ b/roapi-http/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "roapi-http" -version = "0.4.2" +version = "0.4.3" authors = ["QP Hou "] homepage = "https://github.com/roapi/roapi" license = "MIT" @@ -17,7 +17,7 @@ path = "src/main.rs" [dependencies] columnq = { path = "../columnq", version = "0", default-features = false } # for datafusion optimization -snmalloc-rs = { version = "0.2", features= ["cache-friendly"], optional = true } +snmalloc-rs = { version = "0.2", optional = true } # all actix dependencies are patched to use git source until actix-web 4.x lands actix-web = "4.0.0-beta.4"