@@ -37,14 +37,67 @@ jobs:
3737 env :
3838 OUT : ${{ steps.get-tag.outputs.sha }}
3939
40+ build_native_linux :
41+ runs-on : ubuntu-20.04
42+ timeout-minutes : 60
43+ name : Build Linux Native backend for Dev image
44+ container :
45+ image : cubejs/rust-cross:x86_64-unknown-linux-gnu-15082024-python-3.9
46+
47+ steps :
48+ - name : Checkout
49+ uses : actions/checkout@v4
50+ - name : Install Rust
51+ uses : actions-rust-lang/setup-rust-toolchain@v1
52+ with :
53+ toolchain : nightly-2024-07-15
54+ # override: true # this is by default on
55+ rustflags : " "
56+ components : rustfmt
57+ target : x86_64-unknown-linux-gnu
58+ cache : false
59+ - uses : Swatinem/rust-cache@v2
60+ with :
61+ workspaces : ./rust/cubesql -> target
62+ key : cubesql-x86_64-unknown-linux-gnu
63+ shared-key : cubesql-x86_64-unknown-linux-gnu
64+ - name : Install Node.js 18
65+ uses : actions/setup-node@v4
66+ with :
67+ node-version : 18
68+ - name : Install Yarn
69+ run : npm install -g yarn
70+ - name : Set Yarn version
71+ run : yarn policies set-version v1.22.19
72+ # We don't need to install all yarn deps to build native
73+ - name : Install cargo-cp-artifact
74+ run :
npm install -g [email protected] 75+ - name : Build native (with Python)
76+ env :
77+ PYO3_PYTHON : python3.9
78+ CARGO_BUILD_TARGET : x86_64-unknown-linux-gnu
79+ working-directory : ./packages/cubejs-backend-native
80+ run : yarn run native:build-debug-python
81+ - name : Store build artifact for dev image
82+ uses : actions/upload-artifact@v4
83+ with :
84+ name : " native-linux-x64-glibc-3.9.node" # this name is referenced below in docker-image-dev
85+ path : ./packages/cubejs-backend-native/native/index.node
86+ overwrite : true
87+
4088 docker-image-dev :
4189 name : Release :dev image
90+ needs : [latest-tag-sha, build_native_linux]
4291 runs-on : ubuntu-20.04
43- needs : latest-tag-sha
4492 if : (needs['latest-tag-sha'].outputs.sha != github.sha)
4593 steps :
4694 - name : Check out the repo
4795 uses : actions/checkout@v4
96+ - name : Download backend-native artifact
97+ uses : actions/download-artifact@v4
98+ with :
99+ name : " native-linux-x64-glibc-3.9.node" # this name is referenced in above in native_linux
100+ path : ./packages/cubejs-backend-native/
48101 - name : Login to DockerHub
49102 uses : docker/login-action@v3
50103 with :
0 commit comments