forked from yosupo06/library-checker-problems
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (112 loc) · 3.32 KB
/
main.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Diff
on:
push:
branches:
- master
pull_request:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
skip-clang-mac-diffrun:
description: Skip clang-mac-diffrun
required: false
default: false
type: boolean
skip-gcc-ubuntu-diffrun:
description: Skip gcc-ubuntu-diffrun
required: false
default: false
type: boolean
skip-mingw-windows-diffrun:
description: Skip mingw-windows-diffrun
required: false
default: false
type: boolean
jobs:
clang-mac-diffrun:
runs-on: macos-latest
if: ${{ github.event.inputs.skip-clang-mac-diffrun != 'true' }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --user -r requirements.txt
- name: Print verison file
run: |
./ci_generate.py --print-version | tee versions.json
env:
CXX: clang++
- uses: actions/cache@v3
with:
path: cache
key: ${{ runner.os }}-cache-${{ hashFiles('versions.json')}}
restore-keys: |
${{ runner.os }}-cache-
- name: Run generate.py on clang
run: |
./ci_generate.py
env:
CXX: clang++
gcc-ubuntu-diffrun:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.skip-gcc-ubuntu-diffrun != 'true' }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --user -r requirements.txt
- name: Print verison file
run: |
./ci_generate.py --print-version | tee versions.json
- uses: actions/cache@v3
with:
path: cache
key: ${{ runner.os }}-cache-${{ hashFiles('versions.json')}}
restore-keys: |
${{ runner.os }}-cache-
- name: Run generate.py on gcc
run: |
ulimit -s unlimited
./ci_generate.py
mingw-windows-diffrun:
runs-on: windows-latest
if: ${{ github.event.inputs.skip-mingw-windows-diffrun != 'true' }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --user -r requirements.txt
- name: Print verison file
run: |
python ci_generate.py --print-version | tee versions.json
- uses: actions/cache@v3
with:
path: cache
key: ${{ runner.os }}-cache-${{ hashFiles('versions.json')}}
restore-keys: |
${{ runner.os }}-cache-
# avoid conflicts in CI
# https://github.com/actions/runner-images/issues/6755
- name: Add to beginning of PATH
shell: pwsh
run: |
[regex]::Matches($env:PATH, "[^;]+mingw[^;]+") | % Value >> $env:GITHUB_PATH
- name: Run generate.py on gcc
run: |
python ci_generate.py