From 3f374fd670fa9c1866fe984ad840014d34d2811d Mon Sep 17 00:00:00 2001 From: Paul T Date: Mon, 24 Jul 2023 09:49:05 -0400 Subject: [PATCH 1/5] Add documentation CI --- .github/workflows/documentation.yml | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..5ff4663 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,37 @@ +name: Documentation + +on: + push: + tags: + - "*" + +env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + +jobs: + build: + name: Build and publish documentation + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: "**/cpm_modules" + key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: Install dependencies + run: | + brew install doxygen + pip3 install jinja2 Pygments + + - name: Build + run: | + cmake -S documentation -B build + cmake --build build --target GenerateDocs + + - name: Publish + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build/doxygen/html From bc18064aeefdb98a5f06a00d870caa148eb0fb43 Mon Sep 17 00:00:00 2001 From: Paul T Date: Mon, 24 Jul 2023 09:49:11 -0400 Subject: [PATCH 2/5] Add install CI --- .github/workflows/install.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/install.yml diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml new file mode 100644 index 0000000..7436163 --- /dev/null +++ b/.github/workflows/install.yml @@ -0,0 +1,48 @@ +name: Install + +on: + push: + branches: + - master + pull_request: + branches: + - master + +env: + CTEST_OUTPUT_ON_FAILURE: 1 + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: "**/cpm_modules" + key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: set up GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 11 + platform: x64 + + - name: build and install library + run: | + cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release + sudo cmake --build build --target install + rm -rf build + + - name: configure + run: cmake -Stest -Bbuild -DTEST_INSTALLED_VERSION=1 + + - name: build + run: cmake --build build --config Debug -j4 + + - name: test + run: | + cd build + ctest --build-config Debug From 454ce13832bd090b5c52757eacc02fae94dc2d25 Mon Sep 17 00:00:00 2001 From: Paul T Date: Mon, 24 Jul 2023 09:49:17 -0400 Subject: [PATCH 3/5] Add style CI --- .github/workflows/style.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/style.yml diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 0000000..7fabe5e --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,35 @@ +name: Style + +on: + push: + branches: + - master + pull_request: + branches: + - master + +env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + +jobs: + build: + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: "**/cpm_modules" + key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: Install format dependencies + run: | + choco install llvm ninja -y + pip3 install cmake_format==0.6.11 pyyaml + + - name: configure + run: cmake -G Ninja -S . -B build -DDP_GENETIC_BUILD_EXAMPLES=OFF -DDP_GENETIC_BUILD_BENCHMARKS=OFF + + - name: check style + run: cmake --build build --target check-format From 4f5fcb57bb93392fad2d927b46ea7d0e8722fb51 Mon Sep 17 00:00:00 2001 From: Paul T Date: Mon, 24 Jul 2023 09:49:25 -0400 Subject: [PATCH 4/5] Add build CIs --- .github/workflows/ubuntu.yml | 67 +++++++++++++++++++++++++++++++++++ .github/workflows/windows.yml | 36 +++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 .github/workflows/ubuntu.yml create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 0000000..10e8194 --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,67 @@ +name: Ubuntu + +on: + push: + branches: + - master + pull_request: + branches: + - master + +env: + CTEST_OUTPUT_ON_FAILURE: 1 + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + +jobs: + build: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + max-parallel: 4 + + env: + CPP_STANDARD: 20 + + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: "**/cpm_modules" + key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: Set up Clang + uses: egor-tensin/setup-clang@v1 + with: + version: 14 + platform: x64 + + - name: set up GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 11 + platform: x64 + + - name: configure gcc + run: cmake -S . -B build -DDP_GENETIC_BUILD_EXAMPLES=OFF -DDP_GENETIC_BUILD_BENCHMARKS=OFF -DCMAKE_BUILD_TYPE=Debug + + - name: configure clang + run: cmake -S . -B build-clang -DDP_GENETIC_BUILD_EXAMPLE=OFF -DDP_GENETIC_BUILD_BENCHMARKS=OFF -DCMAKE_BUILD_TYPE=Debug + env: + CC: clang + CXX: clang++ + + - name: build + run: | + cmake --build build -j4 + cmake --build build-clang -j4 + + - name: test + run: | + cd build + ctest --build-config Debug + + - name: test clang + run: | + cd build-clang + ctest --build-config Debug diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..02839e9 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,36 @@ +name: Windows + +on: + push: + branches: + - master + pull_request: + branches: + - master + +env: + CTEST_OUTPUT_ON_FAILURE: 1 + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: "**/cpm_modules" + key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: configure + run: cmake -S . -B build -DDP_GENETIC_BUILD_EXAMPLES=OFF -DDP_GENETIC_BUILD_BENCHMARKS=OFF + + - name: build + run: cmake --build build --config Debug -j4 + + - name: test + run: | + cd build + ctest --build-config Debug From f2c8df4be62a92cdfbb3dc2400263b9feea3cb8e Mon Sep 17 00:00:00 2001 From: Paul T Date: Mon, 24 Jul 2023 09:51:00 -0400 Subject: [PATCH 5/5] Use `main` branch instead of `master` in CIs --- .github/workflows/install.yml | 4 ++-- .github/workflows/style.yml | 4 ++-- .github/workflows/ubuntu.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 7436163..41d92bb 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -3,10 +3,10 @@ name: Install on: push: branches: - - master + - main pull_request: branches: - - master + - main env: CTEST_OUTPUT_ON_FAILURE: 1 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 7fabe5e..55c5f3e 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -3,10 +3,10 @@ name: Style on: push: branches: - - master + - main pull_request: branches: - - master + - main env: CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 10e8194..3e66072 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -3,10 +3,10 @@ name: Ubuntu on: push: branches: - - master + - main pull_request: branches: - - master + - main env: CTEST_OUTPUT_ON_FAILURE: 1 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 02839e9..52941e8 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -3,10 +3,10 @@ name: Windows on: push: branches: - - master + - main pull_request: branches: - - master + - main env: CTEST_OUTPUT_ON_FAILURE: 1