Skip to content

Orfs pr fixes

Orfs pr fixes #2204

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: CI
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
docker-images: true
large-packages: false
swap-storage: false
- name: Install runtime dependencies
run: >-
sudo apt-get update && sudo apt-get install -y
libxcb-cursor0
libxcb-icccm4
libxcb-image0
libxcb-keysyms1
libxcb-render-util0
libxcb-shape0
libxcb-util1
libxcb-xinput0
libxcb-xkb1
libxkbcommon-x11-0
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
external-cache: true
- name: Repository cache
uses: actions/cache@v4
with:
path: ~/.cache/bazel-repo
key: bazel-repo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
bazel-repo-${{ runner.os }}-
save-always: true
- name: Disk cache
uses: actions/cache@v4
with:
path: ~/.cache/bazel-disk
key: bazel-disk-${{ runner.os }}-${{ github.sha }}
restore-keys: |
bazel-disk-${{ runner.os }}-
save-always: true
- name: Configure caches
run: |
echo "common --repository_cache=$HOME/.cache/bazel-repo" >> ~/.bazelrc
echo "common --disk_cache=$HOME/.cache/bazel-disk" >> ~/.bazelrc
# Isolate the one-time Bazel module-graph resolution so the Lint step
# below reflects actual lint work, not first-invocation setup.
- name: Warm up Bazel
run: bazelisk mod graph >/dev/null
# --- Lint ---
- name: Lint
run: |
bazelisk run //:fix_lint
git diff --exit-code
# --- Unit tests ---
- name: Build tests
run: bazelisk build ... --build_tests_only --profile=build.profile
- name: Analyze build
if: always()
run: bazelisk analyze-profile build.profile
- name: Run tests
run: bazelisk test ... --keep_going --build_tests_only --test_output=errors --profile=test.profile
- name: Analyze test
if: always()
run: bazelisk analyze-profile test.profile
# --- Gallery ---
- name: Gallery query
working-directory: gallery
run: bazelisk query //...
- name: Gallery tests
working-directory: gallery
run: bazelisk test ... --keep_going --build_tests_only --test_output=errors --profile=gallery.profile
- name: Analyze gallery
if: always()
working-directory: gallery
run: bazelisk analyze-profile gallery.profile
# --- Submodules ---
- name: "Submodule: chisel test"
working-directory: chisel
run: >-
bazelisk test ... --keep_going --build_tests_only --test_output=errors
--override_module=bazel-orfs=${{ github.workspace }}
--profile=chisel.profile
- name: "Submodule: lec build"
working-directory: lec
run: >-
bazelisk build ... --keep_going --profile=lec.profile