Diff #122
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
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 --htmldir=/tmp/html | |
- name: Archive problem statements | |
uses: actions/upload-artifact@v2 | |
with: | |
name: statements | |
path: /tmp/html | |
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 --htmldir=D:/tmp/html |