-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (35 loc) · 1.18 KB
/
daily.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This checks for regressions caused by changes in Cygwin.
name: Daily build of latest release
on:
schedule:
# Randomly generated time.
- cron: '46 5 * * *'
jobs:
# I'm sure there's a more lightweight way to do this, but this works well
# enough...
decide-branches:
name: Decide branches to test
outputs:
branches: ${{ steps.branches.outputs.branches }}
runs-on: ubuntu-latest
steps:
# Produce a JSON array of the branches that both exist and which I want
# to build regularly if they do exist.
- name: Report branches to build
id: branches
run: |
git ls-remote --heads "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" |
cut -f2 |
grep -e '^refs/heads/main$' -e '^refs/heads/rc$' |
jq -Rrs 'rtrimstr("\n") | split("\n") | @json "branches=\(.)"' |
tee /dev/stderr >> "$GITHUB_OUTPUT"
build-test:
uses: cygporter/workflows/.github/workflows/build-test.yml@v2
needs: decide-branches
strategy:
matrix:
branch: ${{ fromJSON(needs.decide-branches.outputs.branches) }}
fail-fast: false
with:
cygport_file: git.cygport
ref: ${{ matrix.branch }}