Skip to content

Add cmake and rework into single executable #136

Add cmake and rework into single executable

Add cmake and rework into single executable #136

name: multi-os-build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
shared: [true, false]
steps:
- name: Install packages
uses: delgurth/get-package@v6
with:
# Space-separated list of packages to install using apt-get. Will only run if on ubuntu.
apt-get: libssl-dev cmake binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686
- name: Checkout with submodules
uses: actions/checkout@v6
- name: config shared=${{ matrix.shared }}
run: >-
cmake
-Bbuild
-DBUILD_SHARED_LIBS=${{ matrix.shared }}
- name: Compile
run: cmake --build build
- name: test
run: ctest --test-dir build -V
build-osx:
runs-on: macos-latest
steps:
- name: Checkout with submodules
uses: actions/checkout@v6
- name: config
run: >-
cmake
-Bbuild
-DENABLE_TESTS=Off
- name: Compile
run: cmake --build build
build-win64-cygwin:
runs-on: windows-latest
steps:
- name: Install Cygwin
# You may pin to the exact commit or the version.
# uses: egor-tensin/setup-cygwin@4f96f9fecb8c952fa32ff791b0a77d93d5191bb4
uses: egor-tensin/setup-cygwin@v4
with:
install-dir: c:\tools\cygwin # optional, default is C:\tools\cygwin
packages: gcc-core gcc-g++ binutils make ninja zip libssl-devel cmake # optional
- name: Checkout with submodules
uses: actions/checkout@v6
- name: Config
run: >-
cmake
-Bbuild
-DENABLE_TESTS=Off
-GNinja
- name: Compile
run: cmake --build build
- name: Pack
run: cd build && cpack -G CygwinBinary
build-win64-msvc:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Install OpenSSL
run: vcpkg install --triplet x64-windows
- name: Build with CL.EXE
run: |
cmake -G "NMake Makefiles" -B build -DENABLE_TESTS=Off
cmake --build build
- name: Package
run: cd build && cpack -G ZIP