change CI CMake build to use Open Watcom toolchain #321
Workflow file for this run
This file contains 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: CMake | ||
on: [push, pull_request] | ||
jobs: | ||
ci-cmake: | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- name: Ubuntu GCC | ||
os: ubuntu-latest | ||
compiler: gcc | ||
cflags: -Werror -Wall -Wextra | ||
# Test out of source builds | ||
- name: Ubuntu GCC OSB | ||
os: ubuntu-latest | ||
compiler: gcc | ||
cflags: -Werror -Wall -Wextra | ||
build-dir: ../build | ||
src-dir: ../zlib | ||
- name: Ubuntu GCC -O3 | ||
os: ubuntu-latest | ||
compiler: gcc | ||
cflags: -O3 -Werror -Wall -Wextra | ||
- name: Ubuntu Clang | ||
os: ubuntu-latest | ||
compiler: clang | ||
cflags: -Werror -Wall -Wextra | ||
- name: Ubuntu Clang Debug | ||
os: ubuntu-latest | ||
compiler: clang | ||
cflags: -Werror -Wall -Wextra | ||
build-config: Debug | ||
- name: Ubuntu OW DOS 16-bit | ||
os: Ubuntu-latest | ||
compiler: watcom | ||
cflags: -ml | ||
cmake-args: -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=DOS -D CMAKE_SYSTEM_PROCESSOR=I86 | ||
artifact: linux-dos-16 | ||
- name: Ubuntu OW DOS 32-bit | ||
os: Ubuntu-latest | ||
compiler: watcom | ||
cmake-args: -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=DOS -D CMAKE_SYSTEM_PROCESSOR=X86 | ||
artifact: linux-dos-32 | ||
- name: Ubuntu OW OS/2 16-bit | ||
os: Ubuntu-latest | ||
compiler: watcom | ||
cflags: -ml | ||
cmake-args: -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=OS2 -D CMAKE_SYSTEM_PROCESSOR=I86 | ||
artifact: linux-os2-16 | ||
- name: Ubuntu OW OS/2 32-bit | ||
os: Ubuntu-latest | ||
compiler: watcom | ||
cmake-args: -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=OS2 -D CMAKE_SYSTEM_PROCESSOR=X86 | ||
artifact: linux-os2-32 | ||
- name: Ubuntu OW Windows 32-bit | ||
os: Ubuntu-latest | ||
compiler: watcom | ||
cmake-args: -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=Windows -D CMAKE_SYSTEM_PROCESSOR=X86 | ||
- name: Ubuntu OW Linux 32-bit | ||
os: Ubuntu-latest | ||
compiler: watcom | ||
watcom-test: 1 | ||
cmake-args: -G "Watcom WMake" | ||
- name: Windows MSVC Win32 | ||
os: windows-latest | ||
compiler: cl | ||
cflags: /WX /W3 | ||
cmake-args: -A Win32 | ||
- name: Windows MSVC Win64 | ||
os: windows-latest | ||
compiler: cl | ||
cflags: /WX /W3 | ||
cmake-args: -A x64 | ||
- name: Windows GCC | ||
os: windows-latest | ||
compiler: gcc | ||
cflags: -Werror -Wall -Wextra | ||
cmake-args: -G Ninja | ||
- name: macOS Clang | ||
os: macos-latest | ||
compiler: clang | ||
cflags: -Werror -Wall -Wextra | ||
- name: macOS GCC | ||
os: macos-latest | ||
compiler: gcc-11 | ||
cflags: -Werror -Wall -Wextra | ||
- name: Windows OW DOS 16-bit | ||
os: windows-latest | ||
compiler: watcom | ||
cflags: -ml | ||
cmake-args: -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=DOS -D CMAKE_SYSTEM_PROCESSOR=I86 | ||
artifact: windows-dos-16 | ||
- name: Windows OW DOS 32-bit | ||
os: windows-latest | ||
compiler: watcom | ||
cmake-args: -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=DOS -D CMAKE_SYSTEM_PROCESSOR=X86 | ||
artifact: windows-dos-32 | ||
- name: Windows OW OS/2 16-bit | ||
os: windows-latest | ||
compiler: watcom | ||
cflags: -ml | ||
cmake-args: -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=OS2 -D CMAKE_SYSTEM_PROCESSOR=I86 | ||
artifact: windows-os2-16 | ||
- name: Windows OW OS/2 32-bit | ||
os: windows-latest | ||
compiler: watcom | ||
cmake-args: -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=OS2 -D CMAKE_SYSTEM_PROCESSOR=X86 | ||
artifact: windows-os2-32 | ||
- name: Windows OW Windows 32-bit | ||
os: windows-latest | ||
compiler: watcom | ||
watcom-test: 1 | ||
cmake-args: -G "Watcom WMake" | ||
- name: Windows OW Linux 32-bit | ||
os: windows-latest | ||
compiler: watcom | ||
cmake-args: -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=Linux -D CMAKE_SYSTEM_PROCESSOR=X86 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install packages (Open Watcom) | ||
if: matrix.compiler == 'watcom' | ||
uses: open-watcom/setup-watcom@v0 | ||
- name: Install packages (Windows) | ||
if: runner.os == 'Windows' && matrix.compiler != 'watcom' | ||
run: | | ||
choco install --no-progress ninja ${{ matrix.packages }} | ||
- name: Generate project files (Open Watcom) | ||
if: matrix.compiler == 'watcom' | ||
run: cmake -S ${{ matrix.src-dir || '.' }} -B ${{ matrix.build-dir || 'build' }} ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} | ||
env: | ||
CFLAGS: ${{ matrix.cflags }} | ||
- name: Upload Artifact (Open Watcom) | ||
if: matrix.compiler == 'watcom' && matrix.artifact != '' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.artifact }} | ||
path: **/* | ||
overwrite: true | ||
- name: Generate project files | ||
if: matrix.compiler != 'watcom' | ||
run: cmake -S ${{ matrix.src-dir || '.' }} -B ${{ matrix.build-dir || 'build' }} ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} | ||
env: | ||
CC: ${{ matrix.compiler }} | ||
CFLAGS: ${{ matrix.cflags }} | ||
- name: Compile source code | ||
run: cmake --build ${{ matrix.build-dir || 'build' }} --config ${{ matrix.build-config || 'Release' }} | ||
- name: Run test cases (Open Watcom) | ||
if: matrix.compiler == 'watcom' && matrix.watcom-test | ||
run: ctest -C Release --output-on-failure --max-width 120 | ||
working-directory: ${{ matrix.build-dir || 'build' }} | ||
- name: Run test cases | ||
if: matrix.compiler != 'watcom' | ||
run: ctest -C Release --output-on-failure --max-width 120 | ||
working-directory: ${{ matrix.build-dir || 'build' }} | ||
- name: Upload build errors | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: ${{ matrix.name }} (cmake) | ||
path: | | ||
**/CMakeFiles/CMakeOutput.log | ||
**/CMakeFiles/CMakeError.log | ||
retention-days: 7 |