Skip to content

Commit

Permalink
Build with Cygwin via GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
thbeu committed Mar 12, 2024
1 parent 71a6552 commit 1bde5b7
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
defaults:
run:
shell: bash

jobs:
build-autoconf:
name: linux-autoconf
Expand Down Expand Up @@ -92,3 +92,57 @@ jobs:
- name: Test
run: ctest --test-dir build --build-config ${{ matrix.configuration }} --verbose

build-cmake-cygwin:
name: ${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
toolchain:
- windows-cygwin

configuration:
- Release

include:
- toolchain: windows-cygwin
os: windows-latest
compiler: gcc

steps:
- name: Set git to use LF
run: git config --global core.autocrlf input

- name: Checkout repository
uses: actions/checkout@v4

- name: Setup cygwin
uses: cygwin/cygwin-install-action@master
with:
packages: >-
cmake
gcc-core
gcc-g++
make
ninja
- name: Configure (${{ matrix.configuration }})
run: |
export PATH=/usr/bin:$PATH
cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON -G Ninja
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'
env:
CYGWIN_NOWINPATH: 1

- name: Build with ${{ matrix.compiler }}
run: |
export PATH=/usr/bin:$PATH
cmake --build build
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'

- name: Test
run: |
export PATH=/usr/bin:$PATH
ctest --test-dir build --build-config ${{ matrix.configuration }} --verbose
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'

0 comments on commit 1bde5b7

Please sign in to comment.