Skip to content

Upgrade nixpkgs to revision 23.05, Bazel upgrade #235

Upgrade nixpkgs to revision 23.05, Bazel upgrade

Upgrade nixpkgs to revision 23.05, Bazel upgrade #235

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
jobs:
test-nixpkgs:
name: Build & Test - Nixpkgs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.ghc-version }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc-version: ["ghc_8_10_7", "ghc_9_0_2", "ghc_9_2_5"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Mount Bazel cache
uses: actions/cache@v2
with:
path: ~/repo-cache
key: repo-cache-${{ runner.os }}-nixpkgs-${{ env.cache-version }}
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=./nixpkgs.nix
- name: Configure
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
run: |
cat >.bazelrc.local <<EOF
build --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/platforms:host
build --bes_results_url=https://app.buildbuddy.io/invocation/
build --bes_backend=grpcs://cloud.buildbuddy.io
build --remote_cache=grpcs://cloud.buildbuddy.io
build --remote_header=x-buildbuddy-api-key="$BUILDBUDDY_API_KEY"
build --remote_timeout=600
build --keep_backend_build_event_connections_alive=false
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
run: nix-shell --pure --run 'bazel test //himportscan:tasty --config=${{ matrix.ghc-version }}'
- name: Build & run gazelle
run: cd example; nix-shell --pure --run 'bazel run //:gazelle --config=${{ matrix.ghc-version }}'
- name: Build & run gazelle fix
run: cd example; nix-shell --pure --run 'bazel run //:gazelle --config=${{ matrix.ghc-version }} -- fix'
- name: Build & test generated rules
run: cd example; nix-shell --pure --run 'bazel test //... --config=${{ matrix.ghc-version }}'
- name: Build & run gazelle with alternative dependencies
run: cd tests/alternative-deps; nix-shell --pure --run 'bazel run //:gazelle --config=${{ matrix.ghc-version }}'
- name: Test for buildifier suggestions
run: nix-shell --pure --run 'bazel run //:buildifier-diff'