From 9270b6aa530cfa73e26c20c2caacbb8feae8fe5d Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Tue, 27 May 2025 16:53:11 +0100 Subject: [PATCH] ci: Try out basic Github ci smoke test Run ci always Allow manual trigger run on all systems fix fix Windows doesn't work, improve smoke tests f t --- .github/workflows/ci.yaml | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..2282774 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,47 @@ +name: Build and smoke test +on: + push: + pull_request: + workflow_dispatch: +defaults: + run: + working-directory: ./client +jobs: + build-and-test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + - macos-latest # arm64 + - macos-13 # osx-64 + # Windows fails with internal compiler error + # - windows-latest + # - windows-11-arm + steps: + - name: Checkout code + uses: actions/checkout@v4 + - uses: bazel-contrib/setup-bazel@0.15.0 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }} + repository-cache: true + - name: Add workdir to PATH + run: | + echo "$(pwd)" >> $GITHUB_PATH + - name: Build + run: bazel build apps/public/Datasets/... + - name: Smoke test + timeout-minutes: 10 + run: | + cd bazel-bin/apps/public/Datasets/v2/cmd/datasets/datasets_ \ + && ./datasets --version \ + && ./datasets --help \ + && ./datasets download virus genome taxon 101947 + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: datasets-${{ matrix.os }} + path: client/bazel-bin/apps/public/Datasets/v2/cmd/datasets/datasets_/datasets