Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/nix-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ on:
branches:
- master
pull_request:
branches:
- '**'
paths:
- .github/workflows/**
pull_request_target:

jobs:
build:
Expand All @@ -19,6 +20,18 @@ jobs:
- 'coq = "master"'
fail-fast: false
steps:
- name: Determine which ref to test
run: |
if [ ${{ github.event_name }} = "push" ]; then
echo "tested_ref=${{ github.ref }}" >> $GITHUB_ENV
else
merge_commit=$(git ls-remote ${{ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge | cut -f1)
if [ -z "$merge_commit" ]; then
echo "tested_ref=refs/pull/${{ github.event.number }}/head" >> $GITHUB_ENV
else
echo "tested_ref=refs/pull/${{ github.event.number }}/merge" >> $GITHUB_ENV
fi
fi
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
Expand All @@ -33,5 +46,7 @@ jobs:
with:
name: math-comp
- uses: actions/checkout@v2
with:
ref: ${{ env.tested_ref }}
- run: >
nix-build https://coq.inria.fr/nix/toolbox --argstr job aac-tactics --arg override '{ ${{ matrix.overrides }}; aac-tactics = builtins.filterSource (path: _: baseNameOf path != ".git") ./.; }'