diff options
author | cen1 <cen.is.imba@gmail.com> | 2025-04-18 15:28:40 +0200 |
---|---|---|
committer | cen1 <cen.is.imba@gmail.com> | 2025-05-25 19:42:45 +0200 |
commit | 4b38800ab7eba3db99935b5aa3d79c02395cfc95 (patch) | |
tree | b93af75e349e1644dbf02186125f3e20095775fa /.github/workflows/build.yml | |
parent | da046e71d9cfdfc0e143b6be0e496fddb9c6bab9 (diff) |
- modernize CMake by adding target_ where missing, split add_library and sources (target_sources), some reordering
- make tests it's own CMake project
- add CMake option to override hardcoded test data paths
- improve CMake documentation, document all options
- add basic CI build for Debian, Fedora and Windows
- add release pipeline to create .deb, .rpm and Windows li/dll archives
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r-- | .github/workflows/build.yml | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1adb852 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,87 @@ +name: CMake + +on: [push, pull_request] + +env: + BUILD_TYPE: Release + +jobs: + debian-bookworm: + runs-on: ubuntu-latest + container: + image: debian:bookworm + + strategy: + matrix: + storm_use_bundled_libraries: [ ON, OFF ] + with_libtomcrypt: [ ON, OFF ] + build_shared_libs: [ ON, OFF ] + unicode: [ ON, OFF ] + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: apt-get -y update && apt-get install -y build-essential cmake + + - name: Conditionally install libtomcrypt-dev + if: matrix.with_libtomcrypt == 'ON' + run: apt-get install -y libtomcrypt-dev pkg-config + + - name: CMake Configuration + run: | + cmake -B build \ + -D CMAKE_BUILD_TYPE=Release \ + -D STORM_USE_BUNDLED_LIBRARIES=${{ matrix.storm_use_bundled_libraries }} \ + -D WITH_LIBTOMCRYPT=${{ matrix.with_libtomcrypt }} \ + -D BUILD_SHARED_LIBS=${{ matrix.build_shared_libs }} \ + -D STORM_UNICODE=${{ matrix.unicode }} + + - name: Build + run: cmake --build build --config Release + + fedora-latest: + if: true + runs-on: ubuntu-latest + container: + image: fedora:latest + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: dnf -y install cmake gcc gcc-c++ + + - name: Cmake + run: cmake -B build -D CMAKE_BUILD_TYPE=$BUILD_TYPE -D BUILD_SHARED_LIBS=ON + + - name: Build + run: cmake --build build --config Release + + windows-latest-x64: + if: true + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - uses: TheMrMilchmann/setup-msvc-dev@v3 + with: + arch: x64 + + - name: Cmake + run: cmake -B build -D CMAKE_BUILD_TYPE=$BUILD_TYPE -D BUILD_SHARED_LIBS=ON + + - name: Build + run: cmake --build build --config Release + + - name: Debug + shell: bash + run: ls -la build + + - name: Check PE + shell: bash + working-directory: ./build/Release + run: | + file "stormlib.dll" + file "stormlib.dll" |grep "x86-64"
\ No newline at end of file |