-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: consolidate workflows into a single one
- Loading branch information
Showing
4 changed files
with
90 additions
and
105 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,90 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install -y g++ | ||
|
||
- name: Setup cmake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: "3.25" | ||
|
||
- name: Configure CMake | ||
run: cmake -B build -S . -DBUILD_TESTING=ON -DBUILD_DOCS=OFF | ||
|
||
- name: Build | ||
run: cmake --build build | ||
|
||
- name: Install | ||
run: cmake --install build | ||
|
||
- name: Test | ||
run: ctest --test-dir build --output-on-failure | ||
docs: | ||
needs: build-and-test | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install -y g++ doxygen | ||
|
||
- uses: actions/setup-python@v4 | ||
|
||
- name: Install python dependencies | ||
run: python -m pip install sphinx sphinx-rtd-theme sphinx-sitemap breathe | ||
|
||
- name: Setup cmake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: "3.25" | ||
|
||
- name: Configure CMake | ||
run: cmake -B build -S . -DBUILD_DOCS=ON -DBUILD_TESTING=OFF | ||
|
||
- name: Build | ||
run: cmake --build build | ||
|
||
- name: Setup pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: "docs/_build/html/" | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
release: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
needs: | ||
- docs | ||
- build-and-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
release-type: simple | ||
package-name: libslope | ||
bump-minor-pre-major: true |
This file was deleted.
Oops, something went wrong.