Skip to content

Commit 5ccfb8f

Browse files
committed
Sync-and-test V1
1 parent 84d06cd commit 5ccfb8f

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Sync & Test - Next
2+
3+
on:
4+
schedule:
5+
- cron: '23 3 * * *' # An arbitary time, once every day.
6+
# Permits triggering for testing.
7+
workflow_dispatch:
8+
9+
env:
10+
workflow_destination_branch: upstream-next2
11+
workflow_source_branch: next
12+
13+
jobs:
14+
sync-with-upstream:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
synced_changes: steps.sync.outputs.has_new_commits
18+
steps:
19+
- name: Checkout next
20+
uses: actions/checkout@v2
21+
with:
22+
# token: can be added here if you want actions to run on push (by
23+
# default, this step uses GITHUB_TOKEN, and therefore no actions are run on
24+
# push). Also, using the default token means workflow changes are blocked,
25+
# which simply forces you review and push workflow changes manually. (Yes,
26+
# the latter means I'll need to manually trigger the asan/lsan/ubsan jobs
27+
# after pushing whenever someone makes a workflow change.)
28+
ref: ${{ env.workflow_destination_branch }}
29+
fetch-depth: 0
30+
- name: Pull upstream changes
31+
id: sync
32+
uses: aormsby/Fork-Sync-With-Upstream-action@v2.3
33+
with:
34+
upstream_repository: git/git
35+
upstream_branch: ${{ env.workflow_source_branch }}
36+
target_branch: ${{ env.workflow_destination_branch }}
37+
git_pull_args: --ff-only
38+
- name: Check for new commits
39+
if: steps.sync.outputs.has_new_commits
40+
run: echo "There were new commits."
41+
- name: Timestamp
42+
run: date
43+
44+
regular:
45+
needs: sync-with-upstream
46+
if: needs.sync-with-upstream.outputs.synced_changes
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
vector:
51+
- jobname: linux-clang
52+
name: Clang - ASAN
53+
cc: clang
54+
pool: ubuntu-latest
55+
sanitize: address
56+
- jobname: linux-clang
57+
name: Clang - UBSAN
58+
cc: clang
59+
pool: ubuntu-latest
60+
sanitize: undefined
61+
- jobname: linux-clang
62+
name: Clang - LSAN (subset of tests)
63+
cc: clang
64+
pool: ubuntu-latest
65+
sanitize: leak,address
66+
t: 'T="\$(wildcard t000[05]-*.sh)"'
67+
name: ${{ matrix.vector.name }}
68+
env:
69+
CC: ${{ matrix.vector.cc }}
70+
SANITIZE: ${{ matrix.vector.sanitize }}
71+
jobname: ${{ matrix.vector.jobname }} # Is needed only for install-dependencies.sh
72+
runs-on: ${{ matrix.vector.pool }}
73+
steps:
74+
- name: Checkout Branch
75+
uses: actions/checkout@v2
76+
with:
77+
ref: ${{ env.workflow_destination_branch }}
78+
- run: ci/install-dependencies.sh
79+
# Cannot use ci/run-build-and-tests.sh because it runs multiple tests for
80+
# jobname=linux-clang (which is unnecessary for the sanitizer runs - they're
81+
# slow enough with just one run), but we need to use that jobname to get the
82+
# right results from ci/install-dependencies.sh (hopefully I can add a
83+
# wildcard to those scripts upstream eventually at which point the jobnames
84+
# can be updated to something like linux-clang-asan, and
85+
# run-build-and-tests.sh will run the tests only once).
86+
- run: source ci/lib.sh && make && make ${{ matrix.vector.t }} test && check_unignored_build_artifacts
87+
- run: ci/print-test-failures.sh
88+
if: failure()

0 commit comments

Comments
 (0)