-
-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cmake workflow for all platforms
- Loading branch information
Showing
5 changed files
with
129 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: FreeBSD CMake | ||
|
||
on: | ||
push: | ||
branches: main | ||
tags-ignore: '*.*' | ||
paths: | ||
- '.github/workflows/cmake-freebsd.yml' | ||
- 'CMakeLists.txt' | ||
- 'include/**' | ||
- 'src/*pp' | ||
- 'src/freebsd/*pp' | ||
pull_request: | ||
branches: main | ||
paths: | ||
- '.github/workflows/cmake-freebsd.yml' | ||
- 'CMakeLists.txt' | ||
- 'include/**' | ||
- 'src/*pp' | ||
- 'src/freebsd/*pp' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Compile | ||
uses: vmactions/freebsd-vm@v1 | ||
with: | ||
release: '14.0' | ||
usesh: true | ||
prepare: pkg install -y cmake ninja | ||
run: | | ||
CXX=clang++ cmake -B build -G Ninja -DBTOP_STATIC=ON | ||
cmake --build build --verbose | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Linux CMake | ||
|
||
on: | ||
push: | ||
branches: main | ||
tags-ignore: '*.*' | ||
paths: | ||
- '.github/workflows/cmake-linux.yml' | ||
- 'CMakeLists.txt' | ||
- 'include/**' | ||
- 'src/*pp' | ||
- 'src/linux/*pp' | ||
pull_request: | ||
branches: main | ||
paths: | ||
- '.github/workflows/cmake-linux.yml' | ||
- 'CMakeLists.txt' | ||
- 'include/**' | ||
- 'src/*pp' | ||
- 'src/linux/*pp' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: alpine:edge | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install build tools | ||
run: apk add --no-cache --update clang cmake lld ninja | ||
|
||
- name: Configure | ||
run: CXX=clang++ LDFLAGS=-fuse-ld=lld cmake -B build -G Ninja -DBTOP_STATIC=ON | ||
|
||
- name: Compile | ||
run: cmake --build build --verbose | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: MacOS CMake | ||
|
||
on: | ||
push: | ||
branches: main | ||
tags-ignore: '*.*' | ||
paths: | ||
- '.github/workflows/cmake-macos.yml' | ||
- 'CMakeLists.txt' | ||
- 'include/**' | ||
- 'src/*pp' | ||
- 'src/osx/*pp' | ||
pull_request: | ||
branches: main | ||
paths: | ||
- '.github/workflows/cmake-macos.yml' | ||
- 'CMakeLists.txt' | ||
- 'include/**' | ||
- 'src/*pp' | ||
- 'src/osx/*pp' | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install build tools | ||
run: | | ||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 | ||
brew update --quiet | ||
brew install --force --overwrite llvm@17 ninja | ||
- name: Configure | ||
run: | | ||
export LLVM_PREFIX="$(brew --prefix llvm)" | ||
export CXX="$LLVM_PREFIX/bin/clang++" | ||
export CPPFLAGS="-I$LLVM_PREFIX/include" | ||
export LDFLAGS="-L$LLVM_PREFIX/lib -L$LLVM_PREFIX/lib/c++ -Wl,-rpath,$LLVM_PREFIX/lib/c++ -fuse-ld=$LLVM_PREFIX/bin/ld64.lld" | ||
cmake -B build -G Ninja | ||
- name: Compile | ||
run: cmake --build build --verbose | ||
|
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
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