-
Notifications
You must be signed in to change notification settings - Fork 175
Fix CI and build with modern cmake #179
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
Merged
Merged
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9283ac3
Make cppast compile with modern toolset
gkodinov 58caf7a
Modernize CI
saraedum bfa3eec
Fix compiler warnings
saraedum e223d35
Add .gitignore
saraedum 6fe9754
Fix syntax
saraedum f726a42
Test for somewhat recent versions of LLVM
saraedum af32ebb
Bump clang requirements in README
saraedum c8eff7c
Fix failing tests due to "unnamed" types
saraedum 6a1800e
Work around SEGFAULT with modern clang
saraedum bb31914
Handle modern cursor types that are not CXCursor_UnexposedDecl anymore
saraedum 82a2443
Skip old clang versions with modern xcode
saraedum 9c3cc19
Set -isysroot and -resource-dir on macOS the same way clang itself does
saraedum d6c4e4a
Skip stdlib tests on macOS
saraedum a110cb0
Drop downloading of LLVM logic
saraedum fd71d33
Use reproducible versions of external dependencies
saraedum 203ce86
Fix llvm-config detection
saraedum 61002c3
Fix cmake dependencies
saraedum 5ab9a60
Add ninja as a cmake dependency
saraedum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,73 +1,48 @@ | ||
| name: CI | ||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| # Here we're keeping on arbitrary LLVM version fixed and varying GCC. | ||
| linux-gcc: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| image: | ||
| # List: https://github.com/conan-io/conan-docker-tools | ||
| - gcc10 | ||
| - gcc9 | ||
| - gcc8 | ||
| - gcc7 | ||
| - gcc6 | ||
|
|
||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: conanio/${{matrix.image}} | ||
| options: --user root | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Create Build Environment | ||
| run: cmake -E make_directory build | ||
| - name: Install libclang | ||
| run: apt-get -qq update && apt-get install -y llvm clang libclang-dev | ||
| - name: Install ninja | ||
| run: type ninja || apt-get install -y ninja-build | ||
| concurrency: | ||
| group: ci-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| - name: Configure | ||
| working-directory: build/ | ||
| run: cmake -GNinja $GITHUB_WORKSPACE | ||
| - name: Build | ||
| working-directory: build/ | ||
| run: cmake --build . | ||
| - name: Test | ||
| working-directory: build/ | ||
| run: ctest --output-on-failure | ||
|
|
||
| # Here we're varying the LLVM version and using its clang for compiling as well. | ||
| linux-clang: | ||
| jobs: | ||
| test: | ||
| runs-on: ${{ matrix.on }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: [7, 8, 9, 10] | ||
|
|
||
| runs-on: ubuntu-latest | ||
| container: | ||
| # Just one of the newer images. | ||
| image: conanio/gcc10 | ||
| options: --user root | ||
| include: | ||
| - { environment: "llvm-15", on: "ubuntu-24.04" } | ||
| - { environment: "llvm-16", on: "ubuntu-24.04" } | ||
| - { environment: "llvm-17", on: "ubuntu-24.04" } | ||
| - { environment: "llvm-18", on: "ubuntu-24.04" } | ||
| - { environment: "llvm-19", on: "ubuntu-24.04" } | ||
| - { environment: "llvm-20", on: "ubuntu-24.04" } | ||
| - { environment: "llvm-21", on: "ubuntu-24.04" } | ||
| - { environment: "llvm-22", on: "ubuntu-24.04" } | ||
| # The Xcode 16.x SDK is not compatible with such an old clang | ||
| # - { environment: "llvm-15", on: "macos-15" } | ||
| # - { environment: "llvm-16", on: "macos-15" } | ||
| # - { environment: "llvm-17", on: "macos-15" } | ||
| # - { environment: "llvm-18", on: "macos-15" } | ||
| - { environment: "llvm-19", on: "macos-15" } | ||
| # conda cannot solve for clangdev=20,21,22 on Silicon | ||
| # - { environment: "llvm-20", on: "macos-15" } | ||
| # - { environment: "llvm-21", on: "macos-15" } | ||
| # - { environment: "llvm-22", on: "macos-15" } | ||
| # The Xcode 16.x SDK is not compatible with such an old clang | ||
| # - { environment: "llvm-15", on: "macos-15-intel" } | ||
| # - { environment: "llvm-16", on: "macos-15-intel" } | ||
| # - { environment: "llvm-17", on: "macos-15-intel" } | ||
| # - { environment: "llvm-18", on: "macos-15-intel" } | ||
| - { environment: "llvm-19", on: "macos-15-intel" } | ||
| - { environment: "llvm-20", on: "macos-15-intel" } | ||
| - { environment: "llvm-21", on: "macos-15-intel" } | ||
| - { environment: "llvm-22", on: "macos-15-intel" } | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Create Build Environment | ||
| run: cmake -E make_directory build | ||
| - name: Install libclang | ||
| run: apt-get -qq update && apt-get install -y llvm-${{matrix.version}} clang-${{matrix.version}} libclang-${{matrix.version}}-dev | ||
| - name: Install ninja | ||
| run: type ninja || apt-get install -y ninja-build | ||
|
|
||
| - name: Configure | ||
| working-directory: build/ | ||
| run: cmake -GNinja $GITHUB_WORKSPACE -DCMAKE_CXX_COMPILER=clang++-${{matrix.version}} | ||
| - name: Build | ||
| working-directory: build/ | ||
| run: cmake --build . | ||
| - name: Test | ||
| working-directory: build/ | ||
| run: ctest --output-on-failure | ||
|
|
||
| - uses: actions/checkout@v5 | ||
| with: { submodules: recursive } | ||
| - uses: prefix-dev/setup-pixi@v0.9.4 | ||
| with: { pixi-version: v0.68.0 } | ||
| - name: run tests | ||
| run: pixi run -e ${{ matrix.environment }} test |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /build | ||
| /Testing |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| cmake_minimum_required(VERSION 3.1) | ||
| cmake_minimum_required(VERSION 4.0) | ||
|
|
||
| project(tiny-process-library) | ||
|
|
||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.