Skip to content
Open
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
30 changes: 30 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,33 @@ jobs:
cmake -B BUILD/RELEASE/BUILD .
cmake --build BUILD/RELEASE/BUILD --config RELEASE --parallel
cmake --install BUILD/RELEASE/BUILD --config RELEASE
msys2-ucrt64:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v5
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja
- name: CI-Build
run: |
./msys2-ci-build.sh
msys2-clangarm64:
runs-on: windows-11-arm
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v5
- uses: msys2/setup-msys2@v2
with:
msystem: CLANGARM64
update: true
install: git mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-cmake mingw-w64-clang-aarch64-ninja
- name: CI-Build
run: |
./msys2-ci-build.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this script should be at the top level.

Maybe we should consider moving the docker/ folder into a ci/ folder and put everything there or introduce a utils/ folder where this kind of script can go.

30 changes: 30 additions & 0 deletions .github/workflows/regressions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,33 @@ jobs:
cmake -B BUILD/RELEASE/BUILD -DENABLE_REGRESSION=true .
cmake --build BUILD/RELEASE/BUILD --config RELEASE --parallel
cmake --install BUILD/RELEASE/BUILD --config RELEASE
msys2-ucrt64:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v5
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja
- name: CI-Build
run: |
./msys2-ci-build.sh --run-regression
msys2-clangarm64:
runs-on: windows-11-arm
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v5
- uses: msys2/setup-msys2@v2
with:
msystem: CLANGARM64
update: true
install: git mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-cmake mingw-w64-clang-aarch64-ninja
- name: CI-Build
run: |
./msys2-ci-build.sh --run-regression
37 changes: 37 additions & 0 deletions msys2-ci-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
set -euo pipefail

# Set default options
BUILD_TYPE="Release"
BUILD_DIR="build"
INSTALL_DIR="$(pwd)/install"
REGRESSION_TESTS="OFF"
BUILD_SHARED_LIBS="ON"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to test both, shared and static library flows.


SYSTEMC_CI_DEFAULT_TARGET="systemc"
SYSTEMC_CI_REGRESSION_TARGET="check-tests"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current docker entrypoint.sh does:

cmake
cmake --build
cmake --install
make ... check

Is this doing the same?
If so, I am in favor of unifying this accross workflows so that all CI flows use the same build targets.

SYSTEMC_CI_TARGET=${SYSTEMC_CI_DEFAULT_TARGET}

for arg in "$@"; do
if [[ "$arg" == "--run-regression" ]]; then
REGRESSION_TESTS="ON"
SYSTEMC_CI_TARGET=${SYSTEMC_CI_REGRESSION_TARGET}
fi
done

# Generate the project
cmake -B ${BUILD_DIR} \
-D ENABLE_REGRESSION=${REGRESSION_TESTS} \
-D BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \
-D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"

# Build the project
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove all comments (that point out obvious things) from this script.

cmake --build ${BUILD_DIR} --config ${BUILD_TYPE} --parallel --target ${SYSTEMC_CI_TARGET}

# Skip installation for regressions runs
if [ "${REGRESSION_TESTS}" == "OFF" ]; then
cmake --install ${BUILD_DIR}
fi

exit 0
Loading