Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 20 additions & 22 deletions .github/workflows-in/Makefile
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
SHELL := bash
M := .cache/makes
$(shell [ -d $M ] || git clone -q https://github.com/makeplus/makes $M)
include $M/init.mk
YS-VERSION := 0.2.8
include $M/ys.mk
include $M/clean.mk
include $M/shell.mk

YS_VERSION := 0.2.4
YS_PREFIX := $(shell cd ../.. ; pwd)/build/ys
YS := $(YS_PREFIX)/bin/ys-$(YS_VERSION)
INPUT-FILES := $(wildcard */*)
SOURCE-FILES := $(wildcard *.ys)
TARGET-FILES := $(SOURCE-FILES:%.ys=../workflows/%.yml)

INPUT_FILES := $(wildcard */*)
SOURCE_FILES := $(wildcard *.ys)
TARGET_FILES := $(SOURCE_FILES:%.ys=../workflows/%.yml)
export YSPATH := $(ROOT)/ys

export PATH := $(YS_PREFIX)/bin:$(PATH)
export YSPATH := $(shell pwd -P)/ys


build: $(TARGET_FILES)
build: $(TARGET-FILES)


test: force build
@git diff --exit-code $(TARGET_FILES) && \
@git diff --exit-code $(TARGET-FILES) && \
echo -e '\nPASS - No normative changes to .github/workflows/*.yml'


DIFF_ORIG_COMMIT ?= HEAD
DIFF-ORIG-COMMIT ?= HEAD
diff:
@for s in $(SOURCE_FILES); do \
@for s in $(SOURCE-FILES); do \
s=$${s##*/}; \
t=../workflows/$${s%.yml}; \
[[ $$(git show $(DIFF_ORIG_COMMIT):.github/workflows/.$$t \
[[ $$(git show $(DIFF-ORIG-COMMIT):.github/workflows/.$$t \
2>/dev/null) ]] && t=.$$t; \
diff -u --color=auto \
<(yq -P 'sort_keys(..)' \
-o=props <(git show $(DIFF_ORIG_COMMIT):.github/workflows/$$t) | \
-o=props <(git show $(DIFF-ORIG-COMMIT):.github/workflows/$$t) | \
grep -Ev '(^$$|^#)' \
) \
<(yq -P 'sort_keys(..)' \
Expand All @@ -43,8 +44,8 @@ force:
touch *.ys


../workflows/%.yml: %.ys $(YS) $(INPUT_FILES)
@if [ -f "$@" ] ; then chmod a+w $@ ; fi
../workflows/%.yml: %.ys $(YS) $(INPUT-FILES)
@if [[ -f $@ ]] ; then chmod a+w $@ ; fi
@echo "# DO NOT EDIT - GENERATED FROM .github/workflows-in/$<" > $@
@echo >> $@
$(YS) -Y $< >> $@
Expand All @@ -55,11 +56,8 @@ force:
# Auto install a specific version of ys
install-ys: $(YS)
$(YS):
mkdir -p $(YS_PREFIX)
curl -s https://yamlscript.org/install | \
BIN=1 VERSION=$(YS_VERSION) PREFIX=$(YS_PREFIX) bash


stats:
@echo "ys : $$(wc -lm *.ys)"
@echo "yml: $$(wc -lm *.yml)"
@echo "yml: $$(wc -lm ../workflows/*.yml)"
27 changes: 13 additions & 14 deletions .github/workflows-in/api.ys
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!yamlscript/v0
!ys-0

python-preamble-job =::
runs-on: ${{matrix.config.os}}
Expand Down Expand Up @@ -85,10 +85,9 @@ python-bare-tests =::
python -m pytest -vvv api/python/tests


---
!yamlscript/v0:
--- !ys:

:use common: :all
:use common:
:: workflow-setup()

jobs:
Expand All @@ -101,9 +100,9 @@ jobs:
name: pybare/${{matrix.config.pythonv}}/${{matrix.config.os}}
:: python-preamble-job
steps:
- :: checkout-action
- :: python-preamble-steps
- :: python-bare-tests
- :: checkout-action
- :: python-preamble-steps
- :: python-bare-tests

#----------------------------------------------------
# run tests with built+installed wheels
Expand All @@ -114,17 +113,17 @@ jobs:
env:
CMAKE_FLAGS: -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILES=ON
steps:
- :: checkout-action
- :: python-preamble-steps
- :: python-wheel-tests
- :: checkout-action
- :: python-preamble-steps
- :: python-wheel-tests
pywheelwin:
:: setup-job('api' 'pywheel_win')
name: pywheel/${{matrix.config.pythonv}}/${{matrix.config.os}}
:: python-preamble-job-win
env:
CMAKE_FLAGS: -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILES=ON
steps:
- :: checkout-action
- :: python-preamble-steps
- :: setup-env-win
- :: python-wheel-tests
- :: checkout-action
- :: python-preamble-steps
- :: setup-env-win
- :: python-wheel-tests
6 changes: 3 additions & 3 deletions .github/workflows-in/benchmarks.ys
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!yamlscript/v0:
!ys-0:

:use common: :all
:use common:
:: workflow-setup()

jobs:
Expand All @@ -24,7 +24,7 @@ jobs:
#- {std: 17, comp: vs2019 , os: windows-2019, cmkflags: -G 'Visual Studio 16 2019' -A x64}
- {std: 17, comp: vs2022 , os: windows-2022, cmkflags: -G 'Visual Studio 17 2022' -A x64}
- {std: 17, comp: xcode15, os: macos-15-intel, xcver: 16, cmkflags: -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64}
env:: -{'BM' 'ON'} + load('share/env.yaml')
env:: +{'BM' 'ON'} + load('share/env.yaml')
steps:
- :: checkout-action
- :: version-get-vars
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows-in/clang.ys
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!yamlscript/v0:
!ys-0:

:use common: :all
:use common:
:: workflow-setup()

jobs:
Expand All @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
item =: \({:std %1, :cxx %2, :bt %3, :bitlinks 'shared64 static32'})
include:: &include1 -[
include:: &include1 +[
item(20 'clang++-18' 'Debug' )
item(20 'clang++-18' 'Release') ]
env:: load('share/env.yaml')
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
fail-fast: false
matrix:
include: *include1
env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} +
env:: +{'CXXFLAGS' '-fno-exceptions -fno-rtti'} +
load('share/env.yaml')
steps:: checkout-action-docker + install-cxx + run-steps

Expand Down Expand Up @@ -107,6 +107,7 @@ jobs:
- :: run-clang-manual-with-flags('Release' '-O3 -DNDEBUG -m${{matrix.bits}}')
- :: run-clang-manual-with-flags('Release' '-Os -DNDEBUG -m${{matrix.bits}}')


#----------------------------------------------------------------------------
clangsan:
:: setup-job('clang' 'clangsan')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows-in/clang_tidy.ys
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!yamlscript/v0:
!ys-0:

:use common: :all
:use common:
:: workflow-setup()

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows-in/coverage.ys
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!yamlscript/v0:
!ys-0:

:use common: :all
:use common:
:: workflow-setup()

jobs:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows-in/embedded.ys
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
!yamlscript/v0:
!ys-0:

# DOCKER DEBUGGING EXAMPLES AT THE END!


:use common: :all
:use common:
:: workflow-setup()

::
Expand Down Expand Up @@ -100,7 +99,6 @@ matrix-items =::


jobs:

canary11:
:: setup-job('embedded' 'canary11')
:: define-job(list(first(matrix-items)) steps11 'c++11')
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows-in/emscripten.ys
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!yamlscript/v0:
!ys-0:

:use common: :all
:use common:
:: workflow-setup()

jobs:
Expand All @@ -18,14 +18,14 @@ jobs:
item =: \({:std %1, :cxx 'em++', :emver %2, :bt %3,
:os 'ubuntu-latest', :bitlinks :static32})
include:
#- ! item(11 '2.0.34' 'Debug')
- ! item(11 '2.0.34' 'Release')
#- ! item(20 '2.0.34' 'Debug')
- ! item(20 '2.0.34' 'Release')
#- ! item(11 '3.0.0' 'Debug')
- ! item(11 '3.0.0' 'Release')
#- ! item(20 '3.0.0' 'Debug')
- ! item(20 '3.0.0' 'Release')
#- ! item(11 '2.0.34' 'Debug')
- ! item(11 '2.0.34' 'Release')
#- ! item(20 '2.0.34' 'Debug')
- ! item(20 '2.0.34' 'Release')
#- ! item(11 '3.0.0' 'Debug')
- ! item(11 '3.0.0' 'Release')
#- ! item(20 '3.0.0' 'Debug')
- ! item(20 '3.0.0' 'Release')
env:: load('share/env.yaml') + {'EMSCRIPTEN_CACHE_FOLDER' 'emsdk-cache'}
+ {'CMAKE_FLAGS' '-DRYML_TEST_SUITE=OFF'}
steps:
Expand Down
40 changes: 19 additions & 21 deletions .github/workflows-in/gcc.ys
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!yamlscript/v0:
!ys-0:

:use common: :all
:use common:
:: workflow-setup()

jobs:
Expand All @@ -16,14 +16,14 @@ jobs:
item =: \({:std %1, :cxx "g++-$a(%2)", :bt %3, :bitlinks 'shared64 static32', :img "$a(%4)"})
include: &include1
# use gcc13 because it's a lot faster than gcc14
- ! item(11 13 'Debug' '22.04')
- ! item(11 13 'Release' '22.04')
- ! item(20 13 'Debug' '22.04')
- ! item(20 13 'Release' '22.04')
- ! item(11 5 'Debug' '18.04')
- ! item(11 5 'Release' '18.04')
- ! item(11 4.8 'Debug' '18.04')
- ! item(11 4.8 'Release' '18.04')
- :: item(11 13 'Debug' '22.04')
- :: item(11 13 'Release' '22.04')
- :: item(20 13 'Debug' '22.04')
- :: item(20 13 'Release' '22.04')
- :: item(11 5 'Debug' '18.04')
- :: item(11 5 'Release' '18.04')
- :: item(11 4.8 'Debug' '18.04')
- :: item(11 4.8 'Release' '18.04')
env:: load('share/env.yaml')
steps:: checkout-manual + install-cxx + run-steps

Expand Down Expand Up @@ -187,10 +187,8 @@ jobs:
fail-fast: false
matrix:
include::
? for
san qw(asan lsan tsan ubsan)
std [11 14 17 20]
: ! { std:: std, cxx: g++-14, bt:: san, bitlinks: static64 }
for san qw(asan lsan tsan ubsan), std [11 14 17 20]::
{ std:: std, cxx: g++-14, bt:: san, bitlinks: static64 }
env:: load('share/env.yaml')
steps:: checkout-action-docker + install-cxx + run-steps

Expand All @@ -208,13 +206,13 @@ jobs:
include:
# these jobs take much longer, so run only one bitlink pair per job to
# profit from parallelism
- ! item(11 'Debug')
- ! item(11 'Release')
- ! item(14 'Debug')
- ! item(14 'Release')
- ! item(17 'Debug')
- ! item(17 'Release')
env:: -{'TOOLCHAIN' '${{matrix.toolchain}}'} + load('share/env.yaml')
- :: item(11 'Debug')
- :: item(11 'Release')
- :: item(14 'Debug')
- :: item(14 'Release')
- :: item(17 'Debug')
- :: item(17 'Release')
env:: +{'TOOLCHAIN' '${{matrix.toolchain}}'} + load('share/env.yaml')
steps:
- :: checkout-manual
- name: install gcc-arm-linux-gnueabihf
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows-in/infra.ys
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!yamlscript/v0:
!ys-0:

:use common: :all
:use common:
:: workflow-setup()

jobs:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows-in/install.ys
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
!yamlscript/v0:
!ys-0:

:use common: :all
::
workflow-setup:: test_install
:use common:
:: workflow-setup('test_install')

env:
PROJ_PFX_TARGET: ryml-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows-in/macosx.ys
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!yamlscript/v0:
!ys-0:

:use common: :all
:use common:
:: workflow-setup()

jobs:
Expand Down
Loading
Loading