From a9cf714bfd4e3429c13c8c0185178dce43173139 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Sat, 20 May 2023 01:15:53 +0000 Subject: [PATCH 01/16] #53 Add initial GitHub Actions config This config will checkout the code and configure the C++ environment for testing. --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1e5e9d5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI +on: + pull_requests: + push: + branches: + - main + +jobs: + CTest: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + compiler: + - llvm + - gcc + build_type: + - Release + - Debug + include: + - os: windows-latest + compiler: msvc + exclude: + - os: windows-latest + compiler: gcc + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Setup C++ + uses: aminya/setup-cpp@v1 + with: + compiler: ${{ matrix.compiler }} + cmake: true + ninja: true From b2c8e73d56ad2f43b660687603fcf61e09628b89 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Sat, 20 May 2023 01:17:36 +0000 Subject: [PATCH 02/16] #53 Fix type in Actions config It should be pull_request, not pull_requests. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e5e9d5..0664262 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI on: - pull_requests: + pull_request: push: branches: - main From dcd0f180dcaf1a3464d02fffd838be01a42fd34c Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Sat, 20 May 2023 01:27:40 +0000 Subject: [PATCH 03/16] #53 Add Connan config and CTest workflows steps The GitHub workflow now sets up Conan and runs CTest. --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0664262..165b40e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,3 +38,16 @@ jobs: compiler: ${{ matrix.compiler }} cmake: true ninja: true + + - name: Setup Conan + run: | + python3 -m pip install conan + conan profile detect --force + conan install . --output-folder=build --build=missing + + - name: Build and Test + run: | + cmake -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . + cmake --build build + cd build + ctest From f8babfa3f7b1b16598ed2cb1fe41424f92dd457f Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Sat, 20 May 2023 01:38:53 +0000 Subject: [PATCH 04/16] #53 Move Conan setup to setup-cpp action The setup-cpp action can also set up conan automatically. This is easier than manually installing and configuring it. --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 165b40e..fcd9672 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,11 +38,10 @@ jobs: compiler: ${{ matrix.compiler }} cmake: true ninja: true + conan: true - name: Setup Conan run: | - python3 -m pip install conan - conan profile detect --force conan install . --output-folder=build --build=missing - name: Build and Test From 0ea3d5acdb86a340fd030ca7670efb11fc8f12a2 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Sat, 20 May 2023 02:03:40 +0000 Subject: [PATCH 05/16] #53 Update Boost options in conanfile Apparently, you can specify which components of Boost you want to install. Previously, it was installing all of Boost when it only needed Graph. Now the Conan setup takes much less time. --- conanfile.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conanfile.txt b/conanfile.txt index 7e66710..ce472fc 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -5,3 +5,6 @@ gtest/1.13.0 [generators] CMakeDeps CMakeToolchain + +[options] +boost*:graph=True From 0e4aa96837ebbc44c7cb469449382dde0467498d Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Sat, 20 May 2023 02:14:49 +0000 Subject: [PATCH 06/16] #53 Change setup-cpp to actual version There is some issue with llvm not being installed properly, so I'm trying to troubleshoot. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcd9672..1cff7fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v3 - name: Setup C++ - uses: aminya/setup-cpp@v1 + uses: aminya/setup-cpp@v0.26.2 with: compiler: ${{ matrix.compiler }} cmake: true From 770d26bacaa6a0ea13f1771339481d65713e58c6 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Sat, 20 May 2023 02:27:46 +0000 Subject: [PATCH 07/16] #53 Add Make as setup-cpp option For some reason, libbacktrace does not build on the Actions runner. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cff7fb..452d1bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,7 @@ jobs: compiler: ${{ matrix.compiler }} cmake: true ninja: true + make: true conan: true - name: Setup Conan From a6f1b262e8a8059e69803836c2d00002ea861828 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Sat, 20 May 2023 02:45:48 +0000 Subject: [PATCH 08/16] #54 Set LLVM version to 14 in Actions It looks like there might be a version issue with LLVM. THe "Setup Conan" step works for GCC but not LLVM. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 452d1bd..acb6e5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - macos-latest - windows-latest compiler: - - llvm + - llvm-14 - gcc build_type: - Release From d04bc4e10f1332d9efbb53d95322250066a3fe14 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Wed, 24 May 2023 01:32:33 +0000 Subject: [PATCH 09/16] #54 Install library dependencies with apt For some reason, Boost is not building through Conan, so for now I am installing the packages through apt. --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acb6e5f..8aa6619 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,9 +41,20 @@ jobs: make: true conan: true - - name: Setup Conan + # - name: Setup Conan + # run: | + # conan install . --output-folder=build --build=missing + + # - name: Build and Test + # run: | + # cmake -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . + # cmake --build build + # cd build + # ctest + + - name: Install dependencies run: | - conan install . --output-folder=build --build=missing + sudo apt install -y libboost1.74-dev gtest - name: Build and Test run: | From 40e7099110ac818991ae049b9a06e4d5caa10f81 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Wed, 24 May 2023 01:37:02 +0000 Subject: [PATCH 10/16] #54 Update apt install command I used the wrong library name for GTest. It should be libgtest-dev. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8aa6619..9ba6dbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: - name: Install dependencies run: | - sudo apt install -y libboost1.74-dev gtest + sudo apt install -y libboost1.74-dev libgtest-dev - name: Build and Test run: | From 72a665009189838c20f23681c38041142e56cd1e Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Wed, 24 May 2023 01:40:02 +0000 Subject: [PATCH 11/16] #54 Fix CMake config command It was using conan, which is commented out for now. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ba6dbe..9dc8c58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: - name: Build and Test run: | - cmake -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . + cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . cmake --build build cd build ctest From 81247e8177f351d23ca4da8aeb31e2a956d8c929 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Wed, 24 May 2023 01:55:44 +0000 Subject: [PATCH 12/16] #54 Revert back to conan Added some Conan Boost configuration options to only build project dependencies. --- .github/workflows/ci.yml | 28 ++++++++++++++-------------- conanfile.txt | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9dc8c58..ea67e14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,24 +41,24 @@ jobs: make: true conan: true - # - name: Setup Conan - # run: | - # conan install . --output-folder=build --build=missing - - # - name: Build and Test - # run: | - # cmake -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . - # cmake --build build - # cd build - # ctest - - - name: Install dependencies + - name: Setup Conan run: | - sudo apt install -y libboost1.74-dev libgtest-dev + conan install . --output-folder=build --build=missing - name: Build and Test run: | - cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . + cmake -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . cmake --build build cd build ctest + + # - name: Install dependencies + # run: | + # sudo apt install -y libboost1.74-dev libgtest-dev + + # - name: Build and Test + # run: | + # cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . + # cmake --build build + # cd build + # ctest diff --git a/conanfile.txt b/conanfile.txt index ce472fc..4411b12 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -7,4 +7,35 @@ CMakeDeps CMakeToolchain [options] -boost*:graph=True +boost/*:without_atomic=False +boost/*:without_chrono=True +boost/*:without_container=True +boost/*:without_context=True +boost/*:without_contract=True +boost/*:without_coroutine=True +boost/*:without_date_time=True +boost/*:without_exception=True +boost/*:without_fiber=True +boost/*:without_filesystem=True +boost/*:without_graph=False +boost/*:without_graph_parallel=True +boost/*:without_iostreams=True +boost/*:without_json=True +boost/*:without_locale=True +boost/*:without_log=True +boost/*:without_math=False +boost/*:without_mpi=True +boost/*:without_nowide=True +boost/*:without_program_options=True +boost/*:without_python=True +boost/*:without_random=False +boost/*:without_regex=False +boost/*:without_serialization=False +boost/*:without_stacktrace=True +boost/*:without_system=False +boost/*:without_test=True +boost/*:without_thread=True +boost/*:without_timer=True +boost/*:without_type_erasure=True +boost/*:without_url=True +boost/*:without_wave=True From e2ea5b77154121c27789fc31355ec3ace84c7181 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Wed, 24 May 2023 02:07:45 +0000 Subject: [PATCH 13/16] #54 Update conanfile options and CI targets Boost 1.74 conan file apparently is missing some options. Also, I am nearing the free limit for GitHub actions, so I am reducing the number of CI runs. --- .github/workflows/ci.yml | 20 ++++++++++---------- conanfile.txt | 2 -- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea67e14..a109ebb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,20 +12,20 @@ jobs: matrix: os: - ubuntu-latest - - macos-latest - - windows-latest + # - macos-latest + # - windows-latest compiler: - llvm-14 - - gcc + # - gcc build_type: - - Release + # - Release - Debug - include: - - os: windows-latest - compiler: msvc - exclude: - - os: windows-latest - compiler: gcc + # include: + # - os: windows-latest + # compiler: msvc + # exclude: + # - os: windows-latest + # compiler: gcc runs-on: ${{ matrix.os }} diff --git a/conanfile.txt b/conanfile.txt index 4411b12..6a99764 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -20,7 +20,6 @@ boost/*:without_filesystem=True boost/*:without_graph=False boost/*:without_graph_parallel=True boost/*:without_iostreams=True -boost/*:without_json=True boost/*:without_locale=True boost/*:without_log=True boost/*:without_math=False @@ -37,5 +36,4 @@ boost/*:without_test=True boost/*:without_thread=True boost/*:without_timer=True boost/*:without_type_erasure=True -boost/*:without_url=True boost/*:without_wave=True From 4a24642fbe71ee80a320be0cc20cf8685a8732d3 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Wed, 24 May 2023 02:22:48 +0000 Subject: [PATCH 14/16] #54 Comment out C++ setup in CI C++ setup takes a while and seems to put things in odd directories. --- .github/workflows/ci.yml | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a109ebb..de02e23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,33 +32,33 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup C++ - uses: aminya/setup-cpp@v0.26.2 - with: - compiler: ${{ matrix.compiler }} - cmake: true - ninja: true - make: true - conan: true + # - name: Setup C++ + # uses: aminya/setup-cpp@v0.26.2 + # with: + # compiler: ${{ matrix.compiler }} + # cmake: true + # ninja: true + # make: true + # conan: true - - name: Setup Conan - run: | - conan install . --output-folder=build --build=missing - - - name: Build and Test - run: | - cmake -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . - cmake --build build - cd build - ctest - - # - name: Install dependencies + # - name: Setup Conan # run: | - # sudo apt install -y libboost1.74-dev libgtest-dev + # conan install . --output-folder=build --build=missing # - name: Build and Test # run: | - # cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . + # cmake -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . # cmake --build build # cd build # ctest + + - name: Install dependencies + run: | + sudo apt install -y libboost1.74-dev libgtest-dev + + - name: Build and Test + run: | + cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . + cmake --build build + cd build + ctest From 08732e6d8aaa565229e0242bc0592aa85589cd86 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Wed, 24 May 2023 02:28:36 +0000 Subject: [PATCH 15/16] #54 Update apt before install Trying to figure out why CMake cannot find Boost --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de02e23..cce1f91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,7 @@ jobs: - name: Install dependencies run: | + sudo apt update sudo apt install -y libboost1.74-dev libgtest-dev - name: Build and Test From 071e6478661a177abcb0b48b68ee98b5db222352 Mon Sep 17 00:00:00 2001 From: Adam Morrissett Date: Wed, 24 May 2023 02:30:54 +0000 Subject: [PATCH 16/16] #54 Fix Boost dependency The boost1.74-dev package only provides header packages, and Boost Graph is not header only. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cce1f91..f098df8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: - name: Install dependencies run: | sudo apt update - sudo apt install -y libboost1.74-dev libgtest-dev + sudo apt install -y libboost-graph1.74-dev libgtest-dev - name: Build and Test run: |