ci: reduce self-hosted rebuilds (#352) #1152
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_REGISTRIES_MY_REGISTRY_INDEX: https://github.com/rust-lang/crates.io-index | |
| CARGO_TARGET_DIR: ${{ github.workspace }}/../target | |
| jobs: | |
| # 1 | |
| check: | |
| name: Rust project check | |
| runs-on: [self-hosted, Linux, X64] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use preinstalled tools | |
| run: | | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| echo "$HOME/actions-runner/externals/node20/bin" >> "$GITHUB_PATH" | |
| - name: Run cargo test | |
| run: make test | |
| # 2 | |
| fmt: | |
| name: Rust fmt | |
| runs-on: [self-hosted, Linux, X64] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use preinstalled tools | |
| run: | | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| echo "$HOME/actions-runner/externals/node20/bin" >> "$GITHUB_PATH" | |
| - name: Run cargo fmt | |
| run: make fmt | |
| # 3 | |
| e2e: | |
| name: Rust e2e sqllogictest | |
| runs-on: [self-hosted, Linux, X64] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use preinstalled tools | |
| run: | | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| echo "$HOME/actions-runner/externals/node20/bin" >> "$GITHUB_PATH" | |
| - name: Run sqllogictest suite | |
| run: make test-slt | |
| # 4 | |
| wasm-tests: | |
| name: Wasm cargo tests | |
| runs-on: [self-hosted, Linux, X64] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use preinstalled tools | |
| run: | | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| echo "$HOME/actions-runner/externals/node20/bin" >> "$GITHUB_PATH" | |
| - name: Run wasm-bindgen tests (wasm32 target) | |
| run: make test-wasm | |
| # 5 | |
| wasm-examples: | |
| name: Wasm examples (nodejs) | |
| runs-on: [self-hosted, Linux, X64] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use preinstalled tools | |
| run: | | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| echo "$HOME/actions-runner/externals/node20/bin" >> "$GITHUB_PATH" | |
| - name: Build wasm package | |
| run: make wasm-build | |
| - name: Run wasm example scripts | |
| run: make wasm-examples | |
| # 6 | |
| native-examples: | |
| name: Native examples | |
| runs-on: [self-hosted, Linux, X64] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use preinstalled tools | |
| run: | | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| echo "$HOME/actions-runner/externals/node20/bin" >> "$GITHUB_PATH" | |
| - name: Run native examples | |
| run: make native-examples | |
| # 7 | |
| python-tests: | |
| name: Python bindings tests | |
| runs-on: [self-hosted, Linux, X64] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use preinstalled tools | |
| run: | | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| echo "$HOME/actions-runner/externals/node20/bin" >> "$GITHUB_PATH" | |
| - name: Run python binding tests | |
| run: make test-python |