add arrow csr dst col name param #42
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: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| actions: read | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_HOME: ${{ github.workspace }}/.cargo | |
| RUSTC_WRAPPER: sccache | |
| SCCACHE_GHA_ENABLED: "true" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Checkout ladybug | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: LadybugDB/ladybug | |
| fetch-depth: 1 | |
| path: ladybug | |
| - name: Setup sccache | |
| uses: mozilla-actions/sccache-action@v0.0.9 | |
| - name: Setup ccache (Linux) | |
| if: runner.os == 'Linux' | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: precompiled-bin-${{ runner.os }}-${{ runner.arch }}-${{ github.ref }} | |
| max-size: 2G | |
| create-symlink: true | |
| restore-keys: | | |
| precompiled-bin-${{ runner.os }}-${{ runner.arch }}-refs/heads/main | |
| precompiled-bin-${{ runner.os }}-${{ runner.arch }}- | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/.cargo/registry | |
| ${{ github.workspace }}/.cargo/git | |
| key: cargo-registry-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| cargo-registry-${{ runner.os }}- | |
| - name: Resolve compatible lbug artifact run | |
| working-directory: ladybug | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| SHA="$(git rev-parse HEAD)" | |
| API_URL="https://api.github.com/repos/LadybugDB/ladybug/actions/workflows/build-and-deploy.yml/runs" | |
| AUTH_HEADER="Authorization: Bearer $GITHUB_TOKEN" | |
| ACCEPT_HEADER="Accept: application/vnd.github+json" | |
| VERSION_HEADER="X-GitHub-Api-Version: 2022-11-28" | |
| RUN_ID="$( | |
| curl -fsSL \ | |
| -H "$AUTH_HEADER" \ | |
| -H "$ACCEPT_HEADER" \ | |
| -H "$VERSION_HEADER" \ | |
| "$API_URL?head_sha=$SHA&status=success&per_page=1" \ | |
| | python -c 'import json,sys; data=json.load(sys.stdin); runs=data.get("workflow_runs") or []; print(runs[0]["id"] if runs else "")' | |
| )" | |
| if [ -z "$RUN_ID" ]; then | |
| RUN_ID="$( | |
| curl -fsSL \ | |
| -H "$AUTH_HEADER" \ | |
| -H "$ACCEPT_HEADER" \ | |
| -H "$VERSION_HEADER" \ | |
| "$API_URL?branch=main&status=success&per_page=1" \ | |
| | python -c 'import json,sys; data=json.load(sys.stdin); runs=data.get("workflow_runs") or []; print(runs[0]["id"] if runs else "")' | |
| )" | |
| fi | |
| if [ -z "$RUN_ID" ]; then | |
| echo "Could not find a successful LadybugDB/ladybug build-and-deploy run." >&2 | |
| exit 1 | |
| fi | |
| echo "Using Ladybug build-and-deploy RUN_ID=$RUN_ID for SHA=$SHA" | |
| echo "LBUG_PRECOMPILED_RUN_ID=$RUN_ID" >> "$GITHUB_ENV" | |
| - name: Build | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: cargo build --release | |
| - name: Run tests | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: cargo test |