Skip to content

build(ci): add buildjet arm runner #1303

build(ci): add buildjet arm runner

build(ci): add buildjet arm runner #1303

Workflow file for this run

name: ci
on:
schedule:
# run on midnight every sunday (on main)
- cron: '0 0 * * 0'
push:
jobs:
# Run tests and publish amd64
build_amd64:
name: Run tests and publish amd64
runs-on: actuated-8cpu-20gb
concurrency:
group: ${{ github.ref }}-amd64
cancel-in-progress: true
steps:
- uses: dasch-swiss/sipi/.github/actions/checkout@main
with:
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }}
- uses: dasch-swiss/sipi/.github/actions/setup-python@main
- run: make install-requirements
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- run: make docker-test-build-amd64 # two stage build, where test is run in the first stage
- run: make test-smoke-ci
- name: Push image to Docker hub only on main or tag (release) but not on schedule
if: (github.ref_name == 'main' || startsWith(github.ref, 'refs/tags')) && github.event_name != 'schedule'
run: make docker-push-amd64
# Run tests and publish aarch64
build_aarch64:
name: Run tests and publish aarch64
runs-on: actuated-arm64-16cpu-20gb
concurrency:
group: ${{ github.ref }}-aarch64
cancel-in-progress: true
steps:
- uses: dasch-swiss/sipi/.github/actions/checkout@main
with:
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }}
- uses: dasch-swiss/sipi/.github/actions/setup-python@main
- run: make install-requirements
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- run: make docker-test-build-aarch64 # two stage build, where test is run in the first stage
- run: make test-smoke-ci
- name: Push image to Docker hub only on main or tag (release) but not on schedule
if: (github.ref_name == 'main' || startsWith(github.ref, 'refs/tags')) && github.event_name != 'schedule'
run: make docker-push-aarch64
# Build and run tests on aarch64
build_aarch64_2:
name: Build and run tests on aarch64
runs-on: buildjet-4vcpu-ubuntu-2204-arm
steps:
- uses: dasch-swiss/sipi/.github/actions/checkout@main
with:
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }}
- uses: dasch-swiss/sipi/.github/actions/setup-python@main
- run: make install-requirements
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- run: make docker-test-build-aarch64 # two stage build, where test is run in the first stage
- run: make test-smoke-ci
# publish manifest combining aarch64 and amd64 images
publish_manifest:
name: Build and Publish Manifest to Dockerhub
runs-on: ubuntu-latest
needs: [build_amd64, build_aarch64]
if: (github.ref_name == 'main' || startsWith(github.ref, 'refs/tags')) && github.event_name != 'schedule'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- run: make docker-publish-manifest
# build documentation
build_docs:
name: Build docs testrun
runs-on: ubuntu-latest
steps:
- uses: dasch-swiss/sipi/.github/actions/checkout@main
with:
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }}
- uses: dasch-swiss/sipi/.github/actions/setup-python@main
- run: make docs-install-requirements
- run: make docs-build
# publish documentation on release
publish-docs:
name: Build and publish docs on tag
needs: [build_docs]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags') && github.event_name != 'schedule'
steps:
- uses: actions/checkout@v3
- uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
CUSTOM_DOMAIN: sipi.io
CONFIG_FILE: docs/mkdocs.yml
REQUIREMENTS: docs/requirements.txt