WIP: Add cmake and rework into single executable #122
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@v4 | |
| - 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@v4 | |
| - name: config | |
| run: >- | |
| cmake | |
| -Bbuild | |
| -DENABLE_TESTS=Off | |
| - name: Compile | |
| run: cmake --build build | |
| # - name: Compile | |
| # run: CFLAGS="-I$(brew --prefix openssl@1.1)/include/" LDFLAGS="-L$(brew --prefix openssl@1.1)/lib/" make | |
| build-win64: | |
| 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: | |
| platform: x64 # optional, default is x64 | |
| install-dir: c:\tools\cygwin # optional, default is C:\tools\cygwin | |
| packages: gcc-core gcc-g++ binutils make zip libssl-devel cmake # optional | |
| - name: Checkout with submodules | |
| uses: actions/checkout@v4 | |
| - name: config | |
| run: >- | |
| C:\tools\cygwin\bin\bash.exe | |
| cmake | |
| -Bbuild | |
| -DENABLE_TESTS=Off | |
| - name: Compile | |
| run: C:\tools\cygwin\bin\bash.exe cmake --build build | |
| - name: pack | |
| run: C:\tools\cygwin\bin\bash.exe cd build && cpack -G CYGWIN_BINARY | |
| # - name: Compile | |
| # run: make | |
| # - name: Compile Windows-only tools and create a ZIP package | |
| # run: make zip | |