Skip to content

Commit

Permalink
chore: add multiplatform CI (#214)
Browse files Browse the repository at this point in the history
* chore: tesing windows CI

* chore: fixed test-cpp ci triggers

* chore: update cmate tooling calls

* chore: updated cmate to use multiconfig generator option

* chore: fixed cmake options order

* chore: MSVC warnings fixes

* chore: testing with built type

* chore: try separate build type in directories to ignore pesky/useless/annoying msvc runtime types

* chore: testing msvc link flags

* chore: pass CI using release build for windows...

* chore: new cpp CI
  • Loading branch information
chybz authored Jan 16, 2024
1 parent ae30f90 commit 579c66d
Show file tree
Hide file tree
Showing 7 changed files with 324 additions and 181 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/test-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,36 @@ on:
push:
branches:
- main
- renovate/**
paths:
- cpp*
- testdata/**
- gherkin-languages.json
- renovate/**
pull_request:
branches:
- main
paths:
- cpp*
- testdata/**
- gherkin-languages.json
workflow_call:

jobs:
test-cpp:
strategy:
matrix:
os:
#- ubuntu-20.04
#- ubuntu-22.04
#- windows-2019
- windows-2022
runs-on: ${{ matrix.os }}
config:
- os: ubuntu-latest
cc: gcc
- os: ubuntu-latest
cc: clang
- os: macos-latest
cc: clang
- os: windows-latest
cc: cl
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: install dependencies
working-directory: cpp
run: |
cmake -P cmake/cmate update
cmake -P cmake/cmate --cc=${{ matrix.config.cc }} install
- name: configure and build
working-directory: cpp
run: |
cmake -P cmake/cmate configure
cmake -P cmake/cmate build
cmake -P cmake/cmate --cc=${{ matrix.config.cc }} build --release
6 changes: 4 additions & 2 deletions cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ ERRORS = $(patsubst ../testdata/%,acceptance/testdata/%.errors.ndjson,$(BA

.DEFAULT_GOAL = help

# Dummy 1

help: ## Show this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make <target>\n\nWhere <target> is one of:\n"} /^[$$()% a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

Expand Down Expand Up @@ -107,9 +109,9 @@ install-deps: .deps-installed
.PHONY: install-deps

.deps-installed:
./cmake/cmade install
./cmake/cmate install
touch $@

clean-deps:
rm -rf .deps-installed build/root build/ext
./cmake/cmate clean --purge
.PHONY: clean-deps
Loading

0 comments on commit 579c66d

Please sign in to comment.