Skip to content

Release

Release #294

Workflow file for this run

name: Release
on: workflow_dispatch
concurrency:
group: release-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
wasm:
name: Build and Publish WASM
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build wasm
run: wasm-pack build crates/rayexec_wasm/ --scope glaredb
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: wasm-pack publish crates/rayexec_wasm/
python-macos-arm:
name: Build Python (macOS ARM)
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Maturin build
uses: PyO3/maturin-action@v1
with:
args: --release --out dist
working-directory: crates/rayexec_python
container: 'off'
- name: Upload python wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-arm
path: crates/rayexec_python/dist
python-manylinux-x86:
name: Build python (Linux x86-64)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Maturin build
uses: PyO3/maturin-action@v1
with:
before-script-linux: "../../scripts/install_protoc_linux.sh" # Relative to working dir
args: --release --out dist
working-directory: crates/rayexec_python
manylinux: 'auto'
- name: Upload python wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-x86
path: crates/rayexec_python/dist
python-manylinux-arm:
name: Build python (Linux Arm64)
runs-on: ubuntu-2404-arm-4-core
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Maturin build
uses: PyO3/maturin-action@v1
with:
before-script-linux: "../../scripts/install_protoc_linux_arm.sh" # Relative to working dir
args: --release --out dist
working-directory: crates/rayexec_python
# Typically we'd want to use 2.17, but the combination of 2.17 with
# ARM seems to cause compilation failures with ring.
#
# See: <https://github.com/briansmith/ring/issues/1728>
manylinux: 2_28
- name: Upload python wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-arm
path: crates/rayexec_python/dist
python-pypi-upload:
name: Upload to pypi
needs: [python-macos-arm, python-manylinux-x86, python-manylinux-arm]
runs-on: ubuntu-latest
steps:
- name: Download wheels
uses: actions/download-artifact@v4
with:
path: wheels
pattern: wheels-*
merge-multiple: true
- name: List wheels
run: ls -R wheels
- name: Upload to pypi
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
working-directory: wheels
command: upload
args: ./*.whl
docker:
name: Build, push, and deploy docker images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_JSON }}
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v2
- name: Configure gcloud docker
run: gcloud auth configure-docker -q
- name: Build and push server docker image
run: |
docker build . -f Dockerfile.server -t gcr.io/glaredb-artifacts/rayexec-dev
docker push gcr.io/glaredb-artifacts/rayexec-dev
- name: Build and push lakefront docker image
run: |
docker build . -f Dockerfile.lakefront -t gcr.io/glaredb-artifacts/lakefront
docker push gcr.io/glaredb-artifacts/lakefront
# TODO: Remove deploy stuff, move to mono
- name: GKE Credentials
uses: 'google-github-actions/get-gke-credentials@v2'
with:
cluster_name: 'glaredb-gke-public'
location: 'us-central1'
- name: Rollout
run: kubectl rollout restart deployment/rayexec-dev-deployment