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

Fix VERSION file collision on MacOS #92

Merged
merged 7 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/test.yml → .github/workflows/meson.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Test
name: Meson Test

on:
push:
branches: [main]
paths:
- ".github/workflows/test.yml"
- "PROJECT_VERSION"
- "VERSION"
- "meson.build"
- "meson_options.txt"
- "src/**"
Expand All @@ -14,7 +14,7 @@ on:
branches: [main]
paths:
- ".github/workflows/test.yml"
- "PROJECT_VERSION"
- "VERSION"
- "meson.build"
- "meson_options.txt"
- "src/**"
Expand Down Expand Up @@ -125,3 +125,15 @@ jobs:
with:
path: ${{ github.workspace }}/ccache
key: ${{ matrix.cfg.id }}-ccache-${{ github.run_id }}
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Brew Install
run: brew install pkg-config ninja cli11 googletest jsoncpp fmt cmake meson tl-expected
- name: Build cps-config
run: |
meson setup builddir -Dunity=on -Dunity_size=12
ninja -C builddir
- name: Run tests
run: meson test -C builddir
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.22)
file(READ PROJECT_VERSION VERSION)
file(READ VERSION VERSION)
string(STRIP ${VERSION} VERSION_STRIPPED)
project(
cps-config
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
project(
'cps-config',
'cpp',
version : files('PROJECT_VERSION'),
version : files('VERSION'),
license : 'MIT',
meson_version : '>= 0.64',
default_options : ['cpp_std=c++17', 'buildtype=debugoptimized', 'warning_level=2'],
Expand All @@ -30,6 +30,7 @@ cps_config = executable(
conf_h,
dependencies : [dep_cps, dep_fmt, dep_expected, dep_cli11],
install : true,
implicit_include_directories : false,
)

build_tests = get_option('tests')
Expand All @@ -54,6 +55,7 @@ foreach t : ['loader', 'version', 'utils']
f'@t@_test',
f'tests/@[email protected]',
dependencies : [dep_cps, dep_gtest, dep_fmt, dep_expected],
implicit_include_directories : false,
),
protocol : 'gtest',
)
Expand Down
Loading