-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding first draft of workflow for GitHub builds.
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 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,70 @@ | ||
name: Run Builds and Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
linux-build-latest-with-gcc: | ||
name: "Linux gcc-11" | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Install prerequisites | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ninja-build gcc-11 g++-11 | ||
g++ --version | ||
- name: Checkout dhb | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: build library, 32 bit IDs, run test | ||
run: | | ||
[ ! -d build ] && mkdir build | ||
cd build | ||
mkdir gcc | ||
cd gcc | ||
cmake -GNinja -DDHB_BUILD_TESTS=ON -DDHB_WITH_64BIT_IDS=OFF -DCMAKE_CXX_COMPILER=g++-11 ../../ | ||
ninja | ||
./dhb_test | ||
- name: build library, 64 bit IDs, run test | ||
run: | | ||
[ ! -d build ] && mkdir build | ||
cd build | ||
mkdir gcc | ||
cd gcc | ||
cmake -GNinja -DDHB_BUILD_TESTS=ON -DDHB_WITH_64BIT_IDS=ON -DCMAKE_CXX_COMPILER=g++-11 ../../ | ||
ninja | ||
./dhb_test | ||
macos-build-latest-with-clang: | ||
name: "macOS clang" | ||
runs-on: macos-14 | ||
steps: | ||
- name: Install prerequisites | ||
run: | | ||
brew install ninja | ||
brew install libomp | ||
brew install llvm | ||
- name: Checkout dhb | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: build library, 32 bit IDs, run test | ||
run: | | ||
[ ! -d build ] && mkdir build | ||
cd build | ||
cmake -GNinja -DDHB_BUILD_TESTS=ON -DDHB_WITH_64BIT_IDS=OFF -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ .. | ||
ninja | ||
./dhb_test | ||
- name: build library, 64 bit IDs, run test | ||
run: | | ||
[ ! -d build ] && mkdir build | ||
cd build | ||
cmake -GNinja -DDHB_BUILD_TESTS=ON -DDHB_WITH_64BIT_IDS=ON -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ .. | ||
ninja | ||
./dhb_test |