Migrate to Bzlmod, upgrade toolchains, and cleanup #776
Workflow file for this run
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
| # Copyright lowRISC contributors (OpenTitan project). | |
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: CI | |
| on: [push, pull_request] | |
| jobs: | |
| # Run lint checks on codebase. | |
| lint: | |
| # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare environment | |
| uses: ./.github/actions/prepare-env | |
| - name: Run linter checks | |
| run: bazel test //quality/... --test_output=errors | |
| # Build and test everything in the codebase (except the FPGA tests). | |
| build_and_test: | |
| runs-on: ot-provisioning-self-hosted | |
| timeout-minutes: 80 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Build everything | |
| run: | | |
| bazel build //... | |
| bazel build --//src/pa/services:use_vendor_shim //src/pa/services:pa | |
| bazel run //release:release -- \ | |
| --norelease \ | |
| --copy "${PWD}/artifacts" \ | |
| "no_tag_not_a_release" | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifacts | |
| path: artifacts/* | |
| - name: Test everything | |
| # Skip running lint tests as those are run in a previous stage. | |
| run: bazel test --test_tag_filters=-lint,-fpga //... | |
| # Run integration tests. | |
| integration_tests: | |
| runs-on: ot-provisioning-self-hosted | |
| timeout-minutes: 60 | |
| env: | |
| OT_PROV_ORCHESTRATOR_PATH: /home/ci/orchestrator/latest/orchestrator.zip | |
| OT_PROV_ORCHESTRATOR_UNPACK: /home/ci/orchestrator/latest/copy_files.sh | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| # TODO(timothytrippel): It is unclear why the `lfs: true` configuration | |
| # above is not sufficient on self hosted runners. | |
| - name: Initialize LFS objects | |
| run: git lfs pull | |
| - name: Run integration tests (SoftHSM2) | |
| run: OT_PROV_ORCHESTRATOR_PATH="${OT_PROV_ORCHESTRATOR_PATH}" OT_PROV_ORCHESTRATOR_UNPACK="${OT_PROV_ORCHESTRATOR_UNPACK}" OPENTITAN_VAR_DIR=$(pwd)/.otvar-dev ./run_integration_tests.sh | |
| - name: Run integration tests (Thales HSM) | |
| run: OT_PROV_ORCHESTRATOR_PATH="${OT_PROV_ORCHESTRATOR_PATH}" OT_PROV_ORCHESTRATOR_UNPACK="${OT_PROV_ORCHESTRATOR_UNPACK}" OPENTITAN_VAR_DIR=$(pwd)/.otvar-prod ./run_integration_tests.sh --prod |