Skip to content

Commit

Permalink
Fix selctive skipping for basic builds (#53214)
Browse files Browse the repository at this point in the history
* Fix selctive skipping for basic builds

We want basic build to run if any data changes have happened as well.
Also renamed the skip steps and variables for clarity.
  • Loading branch information
kevingranade authored Dec 5, 2021
1 parent 404f806 commit 5707742
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,32 @@ on:
# https://apt.llvm.org/

jobs:
skip-duplicates:
skip-duplicates-code:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
should_skip_code: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**", "data/**", "lang/**"]'
skip-duplicates-mods:
skip-duplicates-data:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip_mods: ${{ steps.skip_check.outputs.should_skip }}
should_skip_data: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**"]'
varied_builds:
needs: skip-duplicates
needs: [ skip-duplicates-code, skip-duplicates-data ]
strategy:
max-parallel: 1
matrix:
Expand All @@ -71,6 +71,7 @@ jobs:
lto: 1
native: linux64
archive-success: basic-build
dont_skip_data_only_changes: 1
title: Basic Build and Test (GCC 9, Curses, LTO)

- compiler: clang++-12
Expand All @@ -83,6 +84,7 @@ jobs:
native: linux64
sanitize: address
mods: --mods=magiclysm
dont_skip_data_only_changes: 1
title: Clang 12, Ubuntu, Tiles, ASan

- compiler: g++-11
Expand Down Expand Up @@ -163,7 +165,7 @@ jobs:
LTO: ${{ matrix.lto }}
RELEASE: ${{ matrix.release }}
ARCHIVE_SUCCESS: ${{ matrix.archive-success }}
SKIP: ${{ needs.skip-duplicates.outputs.should_skip == 'true' || ( matrix.mods != 0 && needs.skip-duplicates-mods.outputs.should_skip_mods == 'true' ) }}
SKIP: ${{ ( matrix.dont_skip_data_only_changes == 0 && needs.skip-duplicates.outputs.should_skip_code == 'true' ) || ( matrix.dont_skip_data_only_changes != 0 && needs.skip-duplicates-mods.outputs.should_skip_data == 'true' ) }}
steps:
- name: checkout repository
if: ${{ env.SKIP == 'false' }}
Expand Down

0 comments on commit 5707742

Please sign in to comment.