-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (51 loc) · 1.55 KB
/
periodic_build_all.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Periodic build all
concurrency: periodic-build-all
on:
schedule:
- cron: "15 4 * * *"
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
generate_matrix:
name: Generate job matrix
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fetch tags
run: |
git fetch --tags
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install required packages
run: |
pip install pyyaml requests
- name: Generate matrix
id: gen_matrix
run: |
set -x
MATRIX=$(python3 scripts/generate_build_matrix.py)
echo "::set-output name=matrix::$MATRIX"
echo "::set-output name=matrix_len::$(echo $MATRIX | jq length)"
outputs:
build_matrix: ${{ steps.gen_matrix.outputs.matrix }}
build_matrix_len: ${{ steps.gen_matrix.outputs.matrix_len }}
build_matrix:
needs: generate_matrix
if: ${{ fromJSON(needs.generate_matrix.outputs.build_matrix_len) > 0 }}
strategy:
matrix:
build_params: ${{ fromJSON(needs.generate_matrix.outputs.build_matrix) }}
fail-fast: false
max-parallel: 1
uses: ./.github/workflows/release.yml
with:
package: ${{ matrix.build_params['package'] }}
version: ${{ matrix.build_params['version'] }}
python_version: ${{ matrix.build_params['python_version'] }}
strategy: ${{ matrix.build_params['strategy'] }}