Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
7a5035a
ci-staging: remove synchronization workflows
VDanielEdwards Jul 9, 2024
4ca2c2b
ci-staging: disable file-check
VDanielEdwards Jul 9, 2024
685109c
ci-staging: run dummy command
VDanielEdwards Jul 9, 2024
9ae0f86
ci-staging: also run on ci/staging
VDanielEdwards Jul 9, 2024
b2266f0
ci-staging: actually skip the check
VDanielEdwards Jul 9, 2024
9987eb7
ci-staging: only run ubuntu-release-builds
VDanielEdwards Jul 9, 2024
297a2c1
ci-staging: pull container from ghcr.io
VDanielEdwards Jul 9, 2024
486610b
ci-staging: replace license-check with dummy as well
VDanielEdwards Jul 9, 2024
b65c7d1
ci-staging: move docker over to build action
VDanielEdwards Jul 9, 2024
872d1cc
ci-staging: run docker container
VDanielEdwards Jul 9, 2024
d36ed51
ci-staging: split build action
VDanielEdwards Jul 9, 2024
d142b35
ci-staging: rename actions and call cmake in docker
VDanielEdwards Jul 9, 2024
b099a75
ci-staging: rename actions, configure and build
VDanielEdwards Jul 9, 2024
a40ba19
ci-staging: shorter build
VDanielEdwards Jul 9, 2024
838d09a
ci-staging: setup test and package actions
VDanielEdwards Jul 9, 2024
ad91aa2
ci-staging: rework action inputs and outputs
VDanielEdwards Jul 9, 2024
acd6f56
ci-staging: rename setup action and use valid output definitions
VDanielEdwards Jul 9, 2024
b94023b
ci-staging: create overarching ci run action
VDanielEdwards Jul 9, 2024
a13283b
ci-staging: add artifact uploading
VDanielEdwards Jul 9, 2024
b1f773a
ci-staging: add windows build
VDanielEdwards Jul 9, 2024
6e85c5f
ci-staging: split off directory computation into own action
VDanielEdwards Jul 9, 2024
5dcaaee
ci-staging: fix with.package-path for upload-artifacts in sil-kit-ci/…
VDanielEdwards Jul 9, 2024
b45793e
ci-staging: switch to combined package building workflow
VDanielEdwards Jul 9, 2024
ef15163
ci-staging: add and use ci presets
VDanielEdwards Jul 9, 2024
ee9ad32
ci-staging: make compilation temporarily faster by dropping optimizat…
VDanielEdwards Jul 10, 2024
9902637
ci-staging: trying to get cmake-package outputs to work
VDanielEdwards Jul 10, 2024
66cd690
ci-staging: trying to get cmake-package outputs to work
VDanielEdwards Jul 10, 2024
4de52f8
ci-staging: wrap command execution in separate action
VDanielEdwards Jul 10, 2024
948fc9a
ci-staging: fix unexpected input warnings
VDanielEdwards Jul 10, 2024
38b645c
ci-staging: package name gets the extension added by github
VDanielEdwards Jul 10, 2024
ff2f9a0
ci-staging: fix packaging action inputs
VDanielEdwards Jul 10, 2024
0c32e6c
ci-staging: rename execution action
VDanielEdwards Jul 10, 2024
844e567
ci-staging: fix inputs of setup action call
VDanielEdwards Jul 10, 2024
b17c56c
ci-staging: simplify action inputs
VDanielEdwards Jul 10, 2024
4982d7b
ci-staging: fix invalid package-path output
VDanielEdwards Jul 10, 2024
7ba848e
ci-staging: remove unused step in the run action
VDanielEdwards Jul 10, 2024
db874e6
ci-staging: bump ilammy/msvc-dev-cmd action to 1.13.0
VDanielEdwards Jul 10, 2024
a79e743
ci-staging: bump windows runners to 2022
VDanielEdwards Jul 10, 2024
cc58fa9
ci-staging: de-bump windows runners to 2019 (no 14.1 toolset)
VDanielEdwards Jul 10, 2024
da803ab
ci-staging: switch the linux docker image to 18.04
VDanielEdwards Jul 10, 2024
3e919ae
ci-staging: try to add extra cmake-configure-args via join of outputs
VDanielEdwards Jul 10, 2024
da73d22
ci-staging: let windows use '/' as directory separators to avoid issu…
VDanielEdwards Jul 10, 2024
36ed170
ci-staging: use bash for cleanup and creation of the cmake directories
VDanielEdwards Jul 10, 2024
208f54f
ci-staging: fix description of the dirs action
VDanielEdwards Jul 10, 2024
7a69e0c
ci-staging: fix name and description of the cmake-package action
VDanielEdwards Jul 10, 2024
6b2b2d0
ci-staging: fix name and description of the execute action
VDanielEdwards Jul 10, 2024
9ad1eca
ci-staging: refactor cmake configuration argument computation
VDanielEdwards Jul 10, 2024
ab4814d
ci-staging: refactor execute action to take the whole command line
VDanielEdwards Jul 10, 2024
c8d5963
ci-staging: let the setup action generate the extra cmake arguments
VDanielEdwards Jul 10, 2024
a49fb30
ci-staging: allow overriding cmake configure/build/test/package argum…
VDanielEdwards Jul 10, 2024
fc44953
ci-staging: add workflow to trigger builds manually
VDanielEdwards Jul 10, 2024
8b8d7c5
ci-staging: put extra arguments into single string (JSON) input of `s…
VDanielEdwards Jul 10, 2024
d5e798f
ci-staging: fix cmake-package action
VDanielEdwards Jul 10, 2024
3339ed0
ci-staging: windows x64 build was actually x86
VDanielEdwards Jul 11, 2024
14dc90d
ci-staging: upload artifacts for the workflow building multiple packages
VDanielEdwards Jul 11, 2024
196d83d
ci-staging: limit tests by default to '^I?Test'
VDanielEdwards Jul 11, 2024
da0ab9c
ci-staging: fix package name for windows x64 build
VDanielEdwards Jul 11, 2024
fed737f
ci-staging: greatly simplify the sil-kit-ci actions
VDanielEdwards Jul 12, 2024
dfe40fc
ci-staging: cleanup workflows
VDanielEdwards Jul 12, 2024
c90f9ab
ci-staging: rename workflows
VDanielEdwards Jul 12, 2024
312c693
ci-staging: add generic ci action
VDanielEdwards Jul 12, 2024
dfced33
ci-staging: make fast builds faster
VDanielEdwards Jul 12, 2024
5f732c0
ci-staging: change preset field in the manual build workflow to string
VDanielEdwards Jul 12, 2024
342897d
ci-staging: fix c and c++ compiler inputs
VDanielEdwards Jul 12, 2024
1d55e43
ci-staging: fix ci-pull-request.yaml
VDanielEdwards Jul 12, 2024
982887e
ci-staging: fix ci-pull-request.yaml
VDanielEdwards Jul 12, 2024
d1b5d41
ci-staging: make most inputs of call-build optional
VDanielEdwards Jul 12, 2024
b9e5755
ci-staging: rename jobs of ci-pull-request workflow
VDanielEdwards Jul 12, 2024
cdf9e10
ci-staging: declutter impl-setup action
VDanielEdwards Jul 12, 2024
2317a0d
ci-staging: remove groups from build-sil-kit action
VDanielEdwards Jul 12, 2024
8423bea
ci-staging: fix typo in impl-setup action
VDanielEdwards Jul 12, 2024
e386240
ci-staging: simplify impl-execute action
VDanielEdwards Jul 12, 2024
ec3088f
ci-staging: replace github.workspace backslashes with slashes in impl…
VDanielEdwards Jul 12, 2024
39ff40e
ci-staging: explicitly pass work-dir and relative-working-dir to the …
VDanielEdwards Jul 12, 2024
4c2b21f
ci-staging: fix windows working directory computation in impl-execute…
VDanielEdwards Jul 12, 2024
12cb868
ci-staging: use folded-style without trailing newline yaml-strings fo…
VDanielEdwards Jul 12, 2024
ad08bd6
ci-staging: check that the command string doesn't contain newlines in…
VDanielEdwards Jul 12, 2024
3406c8d
ci-staging: use powershell for windows execution
VDanielEdwards Jul 12, 2024
53f6b9e
ci-staging: fix typo in build-sil-kit action
VDanielEdwards Jul 12, 2024
6e1ba8c
ci-staging: explicitly set msvc arch and toolset in the pr builds
VDanielEdwards Jul 12, 2024
a39ed9a
ci-staging: fix compiler selection for manual build workflow
VDanielEdwards Jul 12, 2024
b3c378f
ci-staging: add new manual build workflows
VDanielEdwards Jul 12, 2024
35233e5
ci-staging: install visual studio components
VDanielEdwards Jul 18, 2024
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
146 changes: 0 additions & 146 deletions .github/actions/build-cmake-preset/action.yml

This file was deleted.

150 changes: 150 additions & 0 deletions .github/actions/sil-kit-ci/build-sil-kit/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: sil-kit-ci/build-sil-kit

description: Run the SIL Kit CI builds.

inputs:

preset-name:
description: The preset name from CMakePresets.json
required: true

linux-docker-image:
description: Docker image used under Linux
required: true

c-compiler:
description: C compiler used under Linux
required: true

cxx-compiler:
description: C++ compiler used under Linux
required: true

msvc-arch:
description: Target architecture used under Windows/MSVC
required: true

msvc-toolset:
description: Target toolset used under Windows/MSVC
required: true

upload-artifacts:
description: Determines if artifacts created by the actions should be uploaded
required: true

retention-days:
description: Determines the number of days any uploaded artifacts should be retained
required: true

package-name:
description: Name of the package to upload as an artifact
required: true

cmake-configure-args:
description: Extra arguments passed to cmake during configuration
required: true

cmake-build-args:
description: Extra arguments passed to cmake during building
required: true

ctest-args:
description: Extra arguments passed to ctest
required: true

cmake-package-args:
description: Extra arguments passed to cmake during packaging
required: true

runs:
using: composite
steps:

# setup: compute directories for the sil-kit build

- uses: ./.github/actions/sil-kit-ci/impl-setup
id: setup
with:
linux-docker-image: ${{ inputs.linux-docker-image }}
c-compiler: ${{ inputs.c-compiler }}
cxx-compiler: ${{ inputs.cxx-compiler }}
msvc-arch: ${{ inputs.msvc-arch }}
msvc-toolset: ${{ inputs.msvc-toolset }}

- shell: bash
id: dirs
run: |
# compute directories
echo "work-dir=${{ steps.setup.outputs.work-dir }}" >> "$GITHUB_ENV"

- shell: bash
run: |
# remove source, build, and package directories
rm -rfv ${{ env.work-dir }}/{src,bld,pkg}/sil-kit

# checkout

- name: checkout sil-kit sources
uses: actions/checkout@v4
with:
path: ${{ env.work-dir }}/src/sil-kit
submodules: true

# configure, build, test, and package

- name: configure cmake project
uses: ./.github/actions/sil-kit-ci/impl-execute
with:
linux-docker-image: ${{ inputs.linux-docker-image }}
work-dir: ${{ env.work-dir }}
relative-working-dir: src/sil-kit
command: >
cmake
-B "${WORK_DIR}/bld/sil-kit"
--preset "${{ inputs.preset-name }}"
${{ steps.setup.outputs.cmake-configure-args }}
${{ inputs.cmake-configure-args }}
-D CPACK_PACKAGE_DIRECTORY="${WORK_DIR}/pkg/sil-kit"

- name: build cmake project
uses: ./.github/actions/sil-kit-ci/impl-execute
with:
linux-docker-image: ${{ inputs.linux-docker-image }}
work-dir: ${{ env.work-dir }}
relative-working-dir: bld/sil-kit
command: >
cmake
--build .
--parallel
${{ inputs.cmake-build-args }}

- name: test cmake project
uses: ./.github/actions/sil-kit-ci/impl-execute
with:
linux-docker-image: ${{ inputs.linux-docker-image }}
work-dir: ${{ env.work-dir }}
relative-working-dir: bld/sil-kit
command: >
ctest
${{ inputs.ctest-args }}

- name: package cmake project
uses: ./.github/actions/sil-kit-ci/impl-execute
with:
linux-docker-image: ${{ inputs.linux-docker-image }}
work-dir: ${{ env.work-dir }}
relative-working-dir: bld/sil-kit
command: >
cmake
--build .
--target package
${{ inputs.cmake-package-args }}

- name: upload package as artifact
if: ${{ inputs.upload-artifacts == 'true' }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.package-name }}
path: ${{ env.work-dir }}/pkg/sil-kit/SilKit-*-*.zip
retention-days: ${{ inputs.retention-days }}
if-no-files-found: 'error'
68 changes: 68 additions & 0 deletions .github/actions/sil-kit-ci/impl-execute/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: sil-kit-ci/impl-execute

description: >
Execute a command with arguments.

Access to files in the `work-dir` must use the `WORK_DIR` environment variable in the command.
This is required to provide transparent support for execution of the command inside of a docker container.

On Linux runners, the command is executed in a docker container using the `linux-docker-image`.
On Windows runners, the command is executed on the runner itself.

inputs:

work-dir:
required: false
description: >
The command being executed must only access (read and write) files in the work-directory.
On Linux: volume-mounted into a docker container

relative-working-dir:
required: false
description: >
Relative path to the initial working directory inside the `work-directory` (can be empty)

linux-docker-image:
required: false
description: Docker image used under Linux.

command:
required: true
description: Command line to be executed.

runs:
using: composite
steps:

- shell: bash
env:
STRING: ${{ inputs.command }}
run: |
# check if inputs.command contains a newline

# remove trailing newlines and spaces before the check
STRING="${STRING%%[[:space:]]}"

if [[ "${STRING}" == *$'\n'* ]] ; then
echo "::error title=invalid command::must not contain newline characters"
exit 1
fi

- name: (linux) execute command
if: runner.os == 'Linux'
shell: bash
run: |
WORK_DIR="/w"
docker run \
-v "${{ inputs.work-dir }}:/w" \
-w "/w/${{ inputs.relative-working-dir }}" \
"${{ inputs.linux-docker-image }}" \
${{ inputs.command }}

- name: (windows) execute command
if: runner.os == 'Windows'
shell: powershell
working-directory: ${{ inputs.work-dir }}/${{ inputs.relative-working-dir }}
run: |
$WORK_DIR = "${{ inputs.work-dir }}"
${{ inputs.command }}
Loading