Skip to content

Commit

Permalink
Further trimming of the input workflows
Browse files Browse the repository at this point in the history
Thanks to @ingydotnet!
  • Loading branch information
biojppm committed Jan 6, 2025
1 parent a26c7c8 commit 89c896f
Show file tree
Hide file tree
Showing 25 changed files with 386 additions and 701 deletions.
28 changes: 3 additions & 25 deletions .github/workflows-src/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,11 @@
:: use(common)
:: workflow-setup()

env:
PROJ_PFX_TARGET: ryml-
PROJ_PFX_CMAKE: RYML_
CMAKE_FLAGS: -DRYML_TEST_SUITE=ON
NUM_JOBS_BUILD: # 4

jobs:
gettag:
runs-on: ubuntu-latest

steps:
# use fetch-depth to ensure all tags are fetched
- name: checkout
uses: actions/checkout@v4
with: {submodules: recursive, fetch-depth: 0}
- :: checkout-action
- name: Variables (from tag)
if: contains(github.ref, 'tags/v')
run:: bash('benchmarks-vars-1')
Expand All @@ -37,14 +27,8 @@ jobs:
benchmarks:
name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{matrix.bt}}
needs: gettag
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip benchmarks')) ||
contains(github.event.head_commit.message, 'only benchmarks')
continue-on-error: true
:: setup-job('benchmarks')
runs-on: ${{matrix.os}}

strategy:
fail-fast: false
matrix:
Expand All @@ -62,14 +46,9 @@ jobs:
- {std: 17, cxx: xcode,
xcver: 15, bt: Release,
os: macos-13, bitlinks: static64}

env:: -{'BM' 'ON'} + load('share/env.yaml')

steps:
# use fetch-depth to ensure all tags are fetched
- name: checkout
uses: actions/checkout@v4
with: {submodules: recursive, fetch-depth: 0}
- :: checkout-action
- name: install requirements
run: source .github/reqs.sh && c4_install_test_requirements $OS
- name: Download vars.sh
Expand All @@ -82,7 +61,6 @@ jobs:
with: { python-version: '3.10' }
- name: install benchmark plotting dependencies
run:: bash('benchmarks-install')

- name: shared64-configure-------------------------------------------------
run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" &&
source .github/setenv.sh && c4_cfg_test shared64
Expand Down
117 changes: 21 additions & 96 deletions .github/workflows-src/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,13 @@

:: use(common)
:: workflow-setup()
common-steps =: load('share/steps.yaml')

env:
PROJ_PFX_TARGET: ryml-
PROJ_PFX_CMAKE: RYML_
CMAKE_FLAGS: -DRYML_TEST_SUITE=ON
NUM_JOBS_BUILD: # 4

jobs:
#----------------------------------------------------------------------------
clang_canary:
name: clang_canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
continue-on-error: true
if: always() # https://stackoverflow.com/a/62112985/721703
runs-on: ubuntu-latest
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest

:: setup-job('clang')
name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
:: runs-on-docker-c4core('22.04')
strategy:
fail-fast: false
matrix:
Expand All @@ -28,84 +18,44 @@ jobs:
item(20 'clang++-17' 'Release')
item(11 'clang++-9' 'Debug')
item(11 'clang++-9' 'Release') ]

env:: load('share/env.yaml')

steps:
- name: checkout
uses: actions/checkout@v4
with: {submodules: recursive}
- run: git config --system --add safe.directory '*'
- :: common-steps
steps:: checkout-action-docker + install-cxx + run-steps

#----------------------------------------------------------------------------
clang_tabtokens:
name: clang_tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
continue-on-error: true
if: always()
runs-on: ubuntu-latest
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest

:: setup-job('clang')
name: tabtokens/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
:: runs-on-docker-c4core('22.04')
strategy:
fail-fast: false
matrix:
include: *include1

env:: load('share/env.yaml') +
{'CMAKE_FLAGS' '-DRYML_WITH_TAB_TOKENS=ON'}

steps:
- name: checkout
uses: actions/checkout@v4
with: {submodules: recursive}
# needed for running in the docker image.
# see https://github.com/actions/checkout/issues/1169
- run: git config --system --add safe.directory '*'
- run: c4core-install $CXX_
- :: common-steps.drop(1)
steps:: checkout-action-docker + install-cxx + run-steps

#----------------------------------------------------------------------------
clang_noexceptions:
name: clang_noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
continue-on-error: true
if: always()
runs-on: ubuntu-latest
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest

:: setup-job('clang')
name: noexceptions/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
:: runs-on-docker-c4core('22.04')
strategy:
fail-fast: false
matrix:
include: *include1

env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} +
load('share/env.yaml')

steps:
- name: checkout
uses: actions/checkout@v4
with: {submodules: recursive}
# needed for running in the docker image.
# see https://github.com/actions/checkout/issues/1169
- run: git config --system --add safe.directory '*'
- run: c4core-install ${{matrix.cxx}}
- :: common-steps.drop(1)
steps:: checkout-action-docker + install-cxx + run-steps

#----------------------------------------------------------------------------
clang_extended:
name:
"clang_extended/${{matrix.cxx}}/\
c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}}"
continue-on-error: true
if: always()
runs-on: ubuntu-latest
container: ghcr.io/biojppm/c4core/${{matrix.img}}:latest

:: setup-job('clang')
name: extended/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}/vg${{matrix.vg}}
:: runs-on-docker-c4core('${{matrix.img}}')
strategy:
fail-fast: false
matrix:
item =:
\({:std 11, :cxx "clang++-$a(%1)", :bt %2,
:vg 'on', :img "ubuntu$a(%3)"})
item =: \({:std 11, :cxx "clang++-$a(%1)", :bt %2, :vg 'on', :img "$a(%3)"})
include:
- ! item(17 'Debug' '22.04')
- ! item(17 'Release' '22.04')
Expand Down Expand Up @@ -139,29 +89,14 @@ jobs:
- ! item(4.0 'Release' '18.04')
- ! item(3.9 'Debug' '18.04')
- ! item(3.9 'Release' '18.04')

env:: load('share/env.yaml')

steps:
# cannot use the checkout@v3 or v4 action on ubuntu18.04 because of nodejs
# version
#- name: checkout
# uses: actions/checkout@v3
# with: {submodules: recursive}
#... so we checkout manually:
- name: checkout
run:: bash('clang-checkout')
- run: c4core-install ${{matrix.cxx}}
- :: common-steps.drop(1)
steps:: checkout-manual + install-cxx + run-steps

#----------------------------------------------------------------------------
clangsan:
name: clang/${{matrix.bt}}/c++${{matrix.std}}
continue-on-error: true
if: always()
runs-on: ubuntu-latest
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest

:: setup-job('clang')
name: san/${{matrix.bt}}/c++${{matrix.std}}
:: runs-on-docker-c4core('22.04')
strategy:
fail-fast: false
matrix:
Expand All @@ -174,18 +109,8 @@ jobs:
cxx: clang++-17
bt:: san
bitlinks: static64

env:: load('share/env.yaml')

steps:
- name: checkout
uses: actions/checkout@v4
with: {submodules: recursive}
# needed for running in the docker image.
# see https://github.com/actions/checkout/issues/1169
- run: git config --system --add safe.directory '*'
- run: c4core-install ${{matrix.cxx}}
- :: common-steps.drop(1)
steps:: checkout-action-docker + install-cxx + run-steps

# #----------------------------------------------------------------------------
# # https://blog.kitware.com
Expand Down
25 changes: 3 additions & 22 deletions .github/workflows-src/clang_tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,12 @@

:: use(common)
:: workflow-setup()
common-steps =: load('share/steps.yaml')

env:
PROJ_PFX_TARGET: ryml-
PROJ_PFX_CMAKE: RYML_
CMAKE_FLAGS: -DRYML_TEST_SUITE=ON
NUM_JOBS_BUILD: # 4

jobs:
clang_tidy:
:: setup-job('clang_tidy')
name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}}
continue-on-error: true
if: always() # https://stackoverflow.com/a/62112985/721703
runs-on: ubuntu-latest
container: ghcr.io/biojppm/c4core/ubuntu22.04:latest

:: runs-on-docker-c4core('22.04')
strategy:
fail-fast: false
matrix:
Expand All @@ -31,14 +21,5 @@ jobs:
bt:: bt
lint: clang-tidy
bitlinks:: bl

env:: load('share/env.yaml')

steps:
- name: checkout
uses: actions/checkout@v4
with: {submodules: recursive}
# needed for running in the docker image.
# see https://github.com/actions/checkout/issues/1169
- run: git config --system --add safe.directory '*'
- :: common-steps
steps:: checkout-action-docker + install-cxx + run-steps
16 changes: 1 addition & 15 deletions .github/workflows-src/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,11 @@
:: use(common)
:: workflow-setup()

env:
PROJ_PFX_TARGET: ryml-
PROJ_PFX_CMAKE: RYML_
CMAKE_FLAGS: -DRYML_TEST_SUITE=ON
NUM_JOBS_BUILD: # 4

jobs:
coverage:
:: setup-job('coverage')
name: coverage/c++${{matrix.std}}${{matrix.cmk}}
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip coverage')) ||
contains(github.event.head_commit.message, 'only coverage')
continue-on-error: true
runs-on: ${{matrix.os}}

strategy:
fail-fast: false
matrix:
Expand All @@ -30,7 +18,6 @@ jobs:
# test also with the debug code enabled
- ! item(11) + {:cmk '-DRYML_DBG=ON'}
- ! item(17) + {:cmk '-DRYML_DBG=ON'}

env: !:merge*
- ! load('share/env.yaml')
- CMAKE_FLAGS: ${{matrix.cmk}}
Expand Down Expand Up @@ -107,4 +94,3 @@ jobs:
# with:
# github-token: ${{ secrets.github_token }}
# parallel-finished: true

23 changes: 4 additions & 19 deletions .github/workflows-src/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,15 @@
:: use(common)
:: workflow-setup()

env:
PROJ_PFX_TARGET: ryml-
PROJ_PFX_CMAKE: RYML_
CMAKE_FLAGS: '-DRYML_TEST_SUITE=OFF'
NUM_JOBS_BUILD: # 4
EMSCRIPTEN_CACHE_FOLDER: 'emsdk-cache'

jobs:
emscripten:
name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}}
:: setup-job('emscripten')
# this job is always causing trouble, with failures showing unreadable code
# dumps. eg https://github.com/biojppm/rapidyaml/actions/runs/10368522906
# Disabling until we can find a proper way to investigate these failures:
if: ${{ false }}
#if: |
# (!contains(github.event.head_commit.message, 'skip all')) ||
# (!contains(github.event.head_commit.message, 'skip emscripten')) ||
# contains(github.event.head_commit.message, 'only emscripten')

name: emscripten/${{matrix.emver}}/c++${{matrix.std}}/${{matrix.bt}}
continue-on-error: true
runs-on: ${{matrix.os}}

strategy:
fail-fast: false
matrix:
Expand All @@ -39,9 +26,8 @@ jobs:
- ! item(11 '3.0.0' 'Release')
#- ! item(20 '3.0.0' 'Debug')
- ! item(20 '3.0.0' 'Release')

env:: load('share/env.yaml')

env:: load('share/env.yaml') + {'EMSCRIPTEN_CACHE_FOLDER' 'emsdk-cache'}
+ {'CMAKE_FLAGS' '-DRYML_TEST_SUITE=OFF'}
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -59,7 +45,6 @@ jobs:
actions-cache-folder: ${{env.EMSCRIPTEN_CACHE_FOLDER}}
- name: show info
run: source .github/setenv.sh && c4_show_info

- name: static32-configure-------------------------------------------------
run: source .github/setenv.sh && c4_cfg_test static32
- name: static32-build
Expand Down
Loading

0 comments on commit 89c896f

Please sign in to comment.