Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Sync & Test - Next | ||
|
||
on: | ||
schedule: | ||
- cron: '23 3 * * *' # An arbitary time, once every day. | ||
# Permits triggering for testing. | ||
workflow_dispatch: | ||
|
||
env: | ||
workflow_destination_branch: upstream-next2 | ||
workflow_source_branch: next | ||
|
||
jobs: | ||
sync-with-upstream: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
synced_changes: steps.sync.outputs.has_new_commits | ||
steps: | ||
- name: Checkout next | ||
uses: actions/checkout@v2 | ||
with: | ||
# token: can be added here if you want actions to run on push (by | ||
# default, this step uses GITHUB_TOKEN, and therefore no actions are run on | ||
# push). Also, using the default token means workflow changes are blocked, | ||
# which simply forces you review and push workflow changes manually. (Yes, | ||
# the latter means I'll need to manually trigger the asan/lsan/ubsan jobs | ||
# after pushing whenever someone makes a workflow change.) | ||
ref: ${{ env.workflow_destination_branch }} | ||
fetch-depth: 0 | ||
- name: Pull upstream changes | ||
id: sync | ||
uses: aormsby/Fork-Sync-With-Upstream-action@v2.3 | ||
with: | ||
upstream_repository: git/git | ||
upstream_branch: ${{ env.workflow_source_branch }} | ||
target_branch: ${{ env.workflow_destination_branch }} | ||
git_pull_args: --ff-only | ||
- name: Check for new commits | ||
if: steps.sync.outputs.has_new_commits | ||
run: echo "There were new commits." | ||
- name: Timestamp | ||
run: date | ||
|
||
regular: | ||
needs: sync-with-upstream | ||
if: needs.sync-with-upstream.outputs.synced_changes | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
vector: | ||
- jobname: linux-clang | ||
name: Clang - ASAN | ||
cc: clang | ||
pool: ubuntu-latest | ||
sanitize: address | ||
- jobname: linux-clang | ||
name: Clang - UBSAN | ||
cc: clang | ||
pool: ubuntu-latest | ||
sanitize: undefined | ||
- jobname: linux-clang | ||
name: Clang - LSAN (subset of tests) | ||
cc: clang | ||
pool: ubuntu-latest | ||
sanitize: leak,address | ||
t: 'T="\$(wildcard t000[05]-*.sh)"' | ||
name: ${{ matrix.vector.name }} | ||
env: | ||
CC: ${{ matrix.vector.cc }} | ||
SANITIZE: ${{ matrix.vector.sanitize }} | ||
jobname: ${{ matrix.vector.jobname }} # Is needed only for install-dependencies.sh | ||
runs-on: ${{ matrix.vector.pool }} | ||
steps: | ||
- name: Checkout Branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ env.workflow_destination_branch }} | ||
- run: ci/install-dependencies.sh | ||
# Cannot use ci/run-build-and-tests.sh because it runs multiple tests for | ||
# jobname=linux-clang (which is unnecessary for the sanitizer runs - they're | ||
# slow enough with just one run), but we need to use that jobname to get the | ||
# right results from ci/install-dependencies.sh (hopefully I can add a | ||
# wildcard to those scripts upstream eventually at which point the jobnames | ||
# can be updated to something like linux-clang-asan, and | ||
# run-build-and-tests.sh will run the tests only once). | ||
- run: source ci/lib.sh && make && make ${{ matrix.vector.t }} test && check_unignored_build_artifacts | ||
- run: ci/print-test-failures.sh | ||
if: failure() |