Skip to content

Commit

Permalink
ci: consolidate workflows into a single one
Browse files Browse the repository at this point in the history
  • Loading branch information
jolars committed Nov 30, 2023
1 parent 85e4abc commit 24e9726
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 105 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/build-and-test.yml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/build-docs.yml

This file was deleted.

90 changes: 90 additions & 0 deletions .github/workflows/ci.yaml
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
20 changes: 0 additions & 20 deletions .github/workflows/release-please.yml

This file was deleted.

0 comments on commit 24e9726

Please sign in to comment.