99 - ' packages/**'
1010 - ' rust/cubestore/**'
1111 - ' rust/cubesql/**'
12+ - ' rust/cubenativeutils/**'
13+ - ' rust/cubeorchestrator/**'
14+ - ' rust/cubeshared/**'
15+ - ' rust/cubesqlplanner/**'
1216 - ' .eslintrc.js'
1317 - ' .prettierrc'
1418 - ' package.json'
2428 - ' packages/**'
2529 - ' rust/cubestore/**'
2630 - ' rust/cubesql/**'
31+ - ' rust/cubenativeutils/**'
32+ - ' rust/cubeorchestrator/**'
33+ - ' rust/cubeshared/**'
34+ - ' rust/cubesqlplanner/**'
2735 - ' .eslintrc.js'
2836 - ' .prettierrc'
2937 - ' package.json'
3038 - ' lerna.json'
3139 - ' rollup.config.js'
3240 - ' yarn.lock'
3341
42+ env :
43+ CUBEJS_TESSERACT_ORCHESTRATOR : true
44+
3445jobs :
3546 unit :
3647 runs-on : ubuntu-20.04
@@ -95,14 +106,15 @@ jobs:
95106 command : yarn install --frozen-lockfile
96107 - name : Lerna tsc
97108 run : yarn tsc
109+ - name : Build native (no python)
110+ run : cd packages/cubejs-backend-native && npm run native:build-release
98111 - name : Build client
99112 run : yarn build
100113 - name : Build cubejs-backend-native (with Python)
101114 run : yarn run native:build-release-python
102115 working-directory : ./packages/cubejs-backend-native
103116 env :
104117 PYO3_PYTHON : python${{ matrix.python-version }}
105-
106118 - name : Lerna test
107119 run : yarn lerna run --concurrency 1 --stream --no-prefix unit
108120# - uses: codecov/codecov-action@v1
@@ -111,6 +123,21 @@ jobs:
111123# files: ./packages/*/coverage/clover.xml
112124# flags: cube-backend
113125# verbose: true # optional (default = false)
126+ - name : Cargo test cubeorchestrator
127+ run : |
128+ cargo test --manifest-path rust/cubeorchestrator/Cargo.toml -j 1
129+ - name : Cargo test cubenativeutils
130+ run : |
131+ cargo test --manifest-path rust/cubenativeutils/Cargo.toml -j 1
132+ - name : Cargo test cubeshared
133+ run : |
134+ cargo test --manifest-path rust/cubeshared/Cargo.toml -j 1
135+ # - name: Cargo test cubesql
136+ # run: |
137+ # cargo test --manifest-path rust/cubesql/Cargo.toml -j 1
138+ # - name: Cargo test cubesqlplanner
139+ # run: |
140+ # cargo test --manifest-path rust/cubesqlplanner/cubesqlplanner/Cargo.toml -j 1
114141
115142 lint :
116143 runs-on : ubuntu-20.04
@@ -159,6 +186,21 @@ jobs:
159186 run : yarn lint:npm
160187 - name : Lerna lint
161188 run : yarn lerna run --concurrency 1 lint
189+ - name : Cargo fmt cubeorchestrator
190+ run : |
191+ cargo fmt --manifest-path rust/cubeorchestrator/Cargo.toml -- --check
192+ - name : Cargo fmt cubenativeutils
193+ run : |
194+ cargo fmt --manifest-path rust/cubenativeutils/Cargo.toml -- --check
195+ - name : Cargo fmt cubeshared
196+ run : |
197+ cargo fmt --manifest-path rust/cubeshared/Cargo.toml -- --check
198+ # - name: Cargo fmt cubesql
199+ # run: |
200+ # cargo fmt --manifest-path rust/cubesql/Cargo.toml -- --check
201+ # - name: Cargo fmt cubesqlplanner
202+ # run: |
203+ # cargo fmt --manifest-path rust/cubesqlplanner/cubesqlplanner/Cargo.toml -- --check
162204
163205 build :
164206 runs-on : ubuntu-20.04
@@ -211,6 +253,21 @@ jobs:
211253 run : yarn lerna run --concurrency 1 build
212254 env :
213255 NODE_OPTIONS : --max_old_space_size=4096
256+ - name : Cargo build cubeorchestrator
257+ run : |
258+ cargo build --manifest-path rust/cubeorchestrator/Cargo.toml -j 4
259+ - name : Cargo build cubenativeutils
260+ run : |
261+ cargo build --manifest-path rust/cubenativeutils/Cargo.toml -j 4
262+ - name : Cargo build cubeshared
263+ run : |
264+ cargo build --manifest-path rust/cubeshared/Cargo.toml -j 4
265+ # - name: Cargo build cubesql
266+ # run: |
267+ # cargo build --manifest-path rust/cubesql/Cargo.toml -j 4
268+ # - name: Cargo build cubesqlplanner
269+ # run: |
270+ # cargo build --manifest-path rust/cubesqlplanner/cubesqlplanner/Cargo.toml -j 4
214271
215272 build-cubestore :
216273 needs : [latest-tag-sha]
@@ -276,6 +333,13 @@ jobs:
276333 df -h
277334 - name : Checkout
278335 uses : actions/checkout@v4
336+ - name : Install Rust
337+ uses : actions-rust-lang/setup-rust-toolchain@v1
338+ with :
339+ toolchain : nightly-2024-07-15
340+ # override: true # this is by default on
341+ rustflags : " "
342+ components : rustfmt
279343 - name : Install Node.js ${{ matrix.node-version }}
280344 uses : actions/setup-node@v4
281345 with :
@@ -305,6 +369,9 @@ jobs:
305369 command : yarn install --frozen-lockfile
306370 - name : Lerna tsc
307371 run : yarn tsc
372+ - name : Build cubejs-backend-native (without Python)
373+ run : yarn run native:build-release
374+ working-directory : ./packages/cubejs-backend-native
308375 - name : Download cubestored-x86_64-unknown-linux-gnu-release artifact
309376 uses : actions/download-artifact@v4
310377 with :
@@ -539,6 +606,8 @@ jobs:
539606 - 5000:5000
540607 strategy :
541608 matrix :
609+ node-version : [ 20 ]
610+ target : [ "x86_64-unknown-linux-gnu" ]
542611 dockerfile :
543612 - dev.Dockerfile
544613 include :
@@ -565,21 +634,29 @@ jobs:
565634 df -h
566635 - name : Checkout
567636 uses : actions/checkout@v4
568- - name : Set up QEMU
569- uses : docker/setup-qemu-action@v3
570- - name : Build image
571- uses : docker/build-push-action@v6
572- timeout-minutes : 30
637+ - name : Install Rust
638+ uses : actions-rust-lang/setup-rust-toolchain@v1
573639 with :
574- context : .
575- file : ./packages/cubejs-docker/${{ matrix.dockerfile }}
576- platforms : linux/amd64
577- push : true
578- tags : localhost:5000/cubejs/cube: ${{ matrix.tag }}
579- - name : Use Node.js 20.x
640+ toolchain : nightly-2024-07-15
641+ # override: true # this is by default on
642+ rustflags : " "
643+ components : rustfmt
644+ target : ${{ matrix.target }}
645+ - name : Install Node.js ${{ matrix.node-version }}
580646 uses : actions/setup-node@v4
581647 with :
582- node-version : 20.x
648+ node-version : ${{ matrix.node-version }}
649+ - name : Install Yarn
650+ run : npm install -g yarn
651+ - name : Set Yarn version
652+ run : yarn policies set-version v1.22.22
653+ - name : Install cargo-cp-artifact
654+ run :
npm install -g [email protected] 655+ - uses : Swatinem/rust-cache@v2
656+ with :
657+ workspaces : ./packages/cubejs-backend-native
658+ key : native-${{ runner.OS }}-${{ matrix.target }}
659+ shared-key : native-${{ runner.OS }}-${{ matrix.target }}
583660 - name : Get yarn cache directory path
584661 id : yarn-cache-dir-path
585662 run : echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
@@ -591,8 +668,6 @@ jobs:
591668 key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
592669 restore-keys : |
593670 ${{ runner.os }}-yarn-
594- - name : Set Yarn version
595- run : yarn policies set-version v1.22.22
596671 - name : Yarn install
597672 uses : nick-fields/retry@v3
598673 env :
@@ -607,6 +682,24 @@ jobs:
607682 run : yarn build
608683 - name : Lerna tsc
609684 run : yarn tsc
685+ - name : Build native (no python)
686+ run : cd packages/cubejs-backend-native && npm run native:build-release
687+ - name : Set up QEMU
688+ uses : docker/setup-qemu-action@v3
689+ # current .dockerignore prevents use of native build
690+ - name : Unignore native from .dockerignore
691+ run : |
692+ grep -v -E "packages/cubejs-backend-native/((native)|(index.node))" .dockerignore > .dockerignore.tmp
693+ mv .dockerignore.tmp .dockerignore
694+ - name : Build image
695+ uses : docker/build-push-action@v6
696+ timeout-minutes : 30
697+ with :
698+ context : .
699+ file : ./packages/cubejs-docker/${{ matrix.dockerfile }}
700+ platforms : linux/amd64
701+ push : true
702+ tags : localhost:5000/cubejs/cube:${{ matrix.tag }}
610703 - name : Testing CubeJS (container mode) via BirdBox
611704 run : |
612705 cd packages/cubejs-testing/
0 commit comments