Skip to content

Commit

Permalink
Add workflow to check status of ys-generated worklows
Browse files Browse the repository at this point in the history
only infra
  • Loading branch information
biojppm committed Jan 9, 2025
1 parent 1ea0a8c commit 99de597
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/infra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# DO NOT EDIT - GENERATED FROM .github/workflows/infra.ys

name: infra
defaults:
run:
shell: bash -e -x {0}
'on':
workflow_dispatch: null
push:
branches:
- master
pull_request:
branches:
- master
env:
PROJ_PFX_TARGET: ryml-
PROJ_PFX_CMAKE: RYML_
CMAKE_FLAGS: -DRYML_TEST_SUITE=ON
NUM_JOBS_BUILD: null
jobs:
check_workflows:
if: |
(!contains(github.event.head_commit.message, 'skip all')) ||
(!contains(github.event.head_commit.message, 'skip infra')) ||
contains(github.event.head_commit.message, 'only infra')
continue-on-error: true
runs-on: ubuntu-22.04
steps:
- name: checkout (action)
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: install ys
run: make -C .github/workflows install-ys
- name: generate workflows
run: make -C .github/workflows build
- name: test workflows I
run: |
make -C .github/workflows diff
status=$?
if [ $status != 0 ] ; then
echo "ERROR: generated workflows are out of date"
fi
exit $status
- name: test workflows II
run: |
make -C .github/workflows test
status=$?
if [ $status != 0 ] ; then
echo "ERROR: generated workflows are out of date"
fi
exit $status
33 changes: 33 additions & 0 deletions .github/workflows/infra.ys
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
!yamlscript/v0:

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

jobs:

#----------------------------------------------------------------------------
check_workflows:
:: setup-job('infra')
runs-on: ubuntu-22.04
steps:
- :: checkout-action
- name: install ys
run: make -C .github/workflows install-ys
- name: generate workflows
run: make -C .github/workflows build
- name: test workflows I
run: |
make -C .github/workflows diff
status=$?
if [ $status != 0 ] ; then
echo "ERROR: generated workflows are out of date"
fi
exit $status
- name: test workflows II
run: |
make -C .github/workflows test
status=$?
if [ $status != 0 ] ; then
echo "ERROR: generated workflows are out of date"
fi
exit $status

0 comments on commit 99de597

Please sign in to comment.