Skip to content

Commit

Permalink
feat(native): Support aarch64-apple-darwin (M1/M2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Jun 19, 2023
1 parent 53c6ee9 commit e21356b
Showing 1 changed file with 84 additions and 9 deletions.
93 changes: 84 additions & 9 deletions .github/workflows/rust-cubesql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ jobs:
CUBEJS_NATIVE_INTERNAL_DEBUG: true
run: cd packages/cubejs-testing && yarn smoke:cubesql

native:
native_darwin:
needs: [lint]
runs-on: ${{ matrix.os-version }}
timeout-minutes: 60
Expand All @@ -211,24 +211,99 @@ jobs:
matrix:
# We don't need to test under all versions, we do it under linux
node-version: [16.x]
os-version: [windows-2019, macos-11]
python-version: ["3.9", "3.10", "3.11", "fallback"]
exclude:
# We dont plan to support windows for native-python
- os-version: windows-2019
target: ["x86_64-apple-darwin", "aarch64-apple-darwin"]
python-version: ["fallback"]
include:
- target: x86_64-apple-darwin
python-version: "3.9"
- os-version: windows-2019
- target: x86_64-apple-darwin
python-version: "3.10"
- os-version: windows-2019
- target: x86_64-apple-darwin
python-version: "3.11"
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-03-22
override: true
components: rustfmt
target: ${{ matrix.target }}
- name: Install Python
uses: actions/setup-python@v4
if: (matrix.python-version != 'fallback')
with:
python-version: ${{ matrix.python-version }}
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set Yarn version
run: yarn policies set-version v1.22.19
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
shell: bash
- name: Restore yarn cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Yarn install
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Lerna tsc
run: yarn tsc
- name: Build native (fallback)
if: (matrix.python-version == 'fallback')
env:
CUBESQL_STREAM_MODE: true
CUBEJS_NATIVE_INTERNAL_DEBUG: true
CARGO_BUILD_TARGET: ${{ matrix.target }}
run: cd packages/cubejs-backend-native && yarn run native:build && yarn run test:unit
- name: Build native (with Python)
if: (matrix.python-version != 'fallback')
env:
PYO3_PYTHON: python${{ matrix.python-version }}
CARGO_BUILD_TARGET: ${{ matrix.target }}
run: cd packages/cubejs-backend-native && yarn run native:build-debug-python
- name: Tests
env:
CUBESQL_STREAM_MODE: true
CUBEJS_NATIVE_INTERNAL_DEBUG: true
run: cd packages/cubejs-backend-native && yarn run test:unit

native_windows:
needs: [lint]
runs-on: ${{ matrix.os-version }}
timeout-minutes: 60
name: Build ${{ matrix.os-version }} ${{ matrix.node-version }} with Python ${{ matrix.python-version }}

strategy:
matrix:
# We don't need to test under all versions, we do it under linux
node-version: [16.x]
os-version: [windows-2019]
python-version: ["fallback"]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Disable rustup update (issue workaround for Windows)
run: rustup set auto-self-update disable
if: contains(runner.os, 'windows')
shell: bash
- name: Install Rust
uses: actions-rs/toolchain@v1
Expand Down

0 comments on commit e21356b

Please sign in to comment.