Skip to content

merge queue: embarking main (6b094f0), #148 and #147 together #1250

merge queue: embarking main (6b094f0), #148 and #147 together

merge queue: embarking main (6b094f0), #148 and #147 together #1250

Workflow file for this run

name: Continuous integration
on:
push:
branches: main
pull_request:
branches: main
workflow_dispatch: # allows manual triggering
schedule:
- cron: '1 11 * * *'
env:
# Bump this number to invalidate the GH actions cache
cache-version: 0
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
test-nixpkgs:
name: Build & Test - Nixpkgs
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc-version: ["ghc_8_10_7", "ghc_9_0_2", "ghc_9_2_5", "ghc_9_4_5", "ghc_9_6_5", "ghc_9_8_1"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Mount Bazel cache
uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5.0.0
with:
path: ~/repo-cache
key: repo-cache-${{ runner.os }}-nixpkgs-${{ env.cache-version }}
- uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0
with:
nix_path: nixpkgs=./nixpkgs.nix
- uses: tweag/configure-bazel-remote-cache-auth@144b0b915f13a418f5eafe2f68d19564ec136c62 # v0.1.1
with:
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
bazelrc_path: .bazelrc.local
- name: Configure
run: |
cat >>.bazelrc.local <<EOF
build --config=remote-cache
build --repository_cache=~/repo-cache/
EOF
ln -s ../.bazelrc.local example/.bazelrc.local
ln -s ../../.bazelrc.local tests/alternative-deps/.bazelrc.local
- name: Build & test himportscan
uses: tweag/run-nix-shell@0d73770bd05096508387d191649e5e858a3c2654 # v0.2.1
with:
run: bazel test //himportscan:tasty --config=${{ matrix.ghc-version }}
- name: Build & run gazelle
uses: tweag/run-nix-shell@0d73770bd05096508387d191649e5e858a3c2654 # v0.2.1
with:
working-directory: example
run: bazel run //:gazelle --config=${{ matrix.ghc-version }}
- name: Build & run gazelle fix
uses: tweag/run-nix-shell@0d73770bd05096508387d191649e5e858a3c2654 # v0.2.1
with:
working-directory: example
run: bazel run //:gazelle --config=${{ matrix.ghc-version }} -- fix
- name: Build & test generated rules
uses: tweag/run-nix-shell@0d73770bd05096508387d191649e5e858a3c2654 # v0.2.1
with:
working-directory: example
run: bazel test //... --config=${{ matrix.ghc-version }}
- name: Build & run gazelle with alternative dependencies
uses: tweag/run-nix-shell@0d73770bd05096508387d191649e5e858a3c2654 # v0.2.1
with:
working-directory: tests/alternative-deps
run: bazel run //:gazelle --config=${{ matrix.ghc-version }}
- name: Test for buildifier suggestions
uses: tweag/run-nix-shell@0d73770bd05096508387d191649e5e858a3c2654 # v0.2.1
with:
run: bazel test //:buildifier-test
all_ci_tests:
runs-on: ubuntu-latest
needs:
- test-nixpkgs
if: ${{ always() }}
steps:
- uses: cgrindel/gha_join_jobs@8a9736c29a7e5ebd9f3af2870f59cb6d563b6659 # v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}