Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add multiplatform CI #214

Merged
merged 11 commits into from
Jan 16, 2024
Merged
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