Add compiler flags #2009
Workflow file for this run
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
name: Build Clio | |
on: | |
push: | |
branches: [master, release/*, develop] | |
pull_request: | |
branches: [master, release/*, develop] | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run clang-format | |
uses: ./.github/actions/lint | |
build_mac: | |
name: Build macOS | |
needs: lint | |
continue-on-error: true | |
runs-on: [self-hosted, macOS] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: clio | |
- name: List conan artifactory | |
run: | | |
conan search | |
conan remote list | |
if [[ $(conan remote list |grep conan-non-prod| wc -c) -ne 0 ]]; then | |
echo "conan-non-prod is available" | |
else | |
echo "adding conan-non-prod" | |
conan remote add conan-non-prod http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod | |
fi | |
- name: Install dependencies | |
run: | | |
brew install llvm@14 pkg-config ninja bison cmake | |
- name: Setup environment for llvm-14 | |
run: | | |
export PATH="/usr/local/opt/llvm@14/bin:$PATH" | |
export LDFLAGS="-L/usr/local/opt/llvm@14/lib -L/usr/local/opt/llvm@14/lib/c++ -Wl,-rpath,/usr/local/opt/llvm@14/lib/c++" | |
export CPPFLAGS="-I/usr/local/opt/llvm@14/include" | |
- name: Build Clio | |
run: | | |
cd clio | |
mkdir -p build | |
cd build | |
conan install .. -of . -b missing -s build_type=Release -o clio:tests=True | |
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release .. | |
cmake --build . --parallel $(($(sysctl -n hw.logicalcpu) - 2)) | |
- name: Upload clio_tests | |
uses: actions/upload-artifact@v3 | |
with: | |
name: clio_tests_mac | |
path: ./clio/build/clio_tests | |
build_linux: | |
name: Build linux | |
needs: lint | |
continue-on-error: true | |
runs-on: [self-hosted, Linux] | |
container: | |
image: conanio/gcc11:1.60.2 | |
options: --user root | |
steps: | |
- name: Get Clio | |
uses: actions/checkout@v3 | |
- name: Get rippled | |
uses: actions/checkout@v3 | |
with: | |
repository: thejohnfreeman/rippled | |
ref: clio | |
path: rippled | |
- name: Build Clio | |
run: | | |
./.github/actions/linux_build/build.sh | |
- name: Upload clio_tests | |
uses: actions/upload-artifact@v3 | |
with: | |
name: clio_tests_linux | |
path: ./build_clio/clio_tests | |
test_mac: | |
needs: build_mac | |
runs-on: [self-hosted, macOS] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: clio_tests_mac | |
- name: Run clio_tests | |
run: | | |
chmod +x ./clio_tests | |
./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*" | |
test_linux: | |
needs: build_linux | |
runs-on: [self-hosted, x-heavy] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: clio_tests_linux | |
- name: Run clio_tests | |
run: | | |
chmod +x ./clio_tests | |
./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*" |