Skip to content

Commit

Permalink
CI: Simplify job structure
Browse files Browse the repository at this point in the history
  • Loading branch information
stotko committed Feb 11, 2024
1 parent 43c0785 commit 0cde9da
Show file tree
Hide file tree
Showing 10 changed files with 358 additions and 361 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
42 changes: 41 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ on:
pull_request:
types: [opened, reopened, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Coverage:
compute:
name: "Compute"
runs-on: ubuntu-22.04

steps:
Expand Down Expand Up @@ -45,6 +50,26 @@ jobs:
run: |
bash tools/dev/run_coverage.sh
- uses: actions/upload-artifact@v4
with:
name: Coverage Report
path: build

publish:
name: Upload coverage report to Codecov
runs-on: ubuntu-22.04

needs:
- compute

steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: Coverage Report
path: build

- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
Expand All @@ -53,3 +78,18 @@ jobs:
fail_ci_if_error: true
verbose: true
disable_search: true

checkcoverage:
if: always()

needs:
- compute
- publish

name: "Check Coverage"
runs-on: ubuntu-22.04

steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
92 changes: 92 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Docs OpenMP

on:
push:
branches:
- master

pull_request:
types: [opened, reopened, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Install OpenMP
shell: bash
run: |
bash tools/ubuntu/install_openmp.sh
- name: Install docs dependencies
shell: bash
run: |
bash tools/ubuntu/install_docs_dependencies.sh
- name: Download dependencies
shell: bash
run: |
bash tools/dev/download_dependencies.sh
- name: Configure project
shell: bash
run: |
bash tools/backend/configure_openmp_documentation.sh
- name: Build documentation
shell: bash
run: |
bash tools/dev/build_documentation.sh
- uses: actions/upload-artifact@v4
with:
name: Docs HTML
path: build/docs/html

publish:
name: Upload latest docs to GitHub Pages
runs-on: ubuntu-22.04
if: github.event_name != 'pull_request'

needs:
- build

permissions:
contents: write

steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: Docs HTML
path: build/docs/html

- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/docs/html
clean: true
single-commit: true

checkdocs:
if: always()

needs:
- build
- publish

name: "Check Docs"
runs-on: ubuntu-22.04

steps:
- uses: re-actors/alls-green@release/v1
with:
allowed-skips: publish
jobs: ${{ toJSON(needs) }}
52 changes: 0 additions & 52 deletions .github/workflows/documentation.yml

This file was deleted.

60 changes: 57 additions & 3 deletions .github/workflows/analysis.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Analysis OpenMP
name: Lint OpenMP

on:
push:
Expand All @@ -8,8 +8,45 @@ on:
pull_request:
types: [opened, reopened, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Clang-Tidy:
clangformat:
name: "Clang-Format"
runs-on: ubuntu-20.04 # Keep Ubuntu 20.04 until raising the requirements to clang-format > 10

steps:
- uses: actions/checkout@v4

- name: Install OpenMP
shell: bash
run: |
bash tools/ubuntu/install_openmp.sh
- name: Install clang-format
shell: bash
run: |
bash tools/ubuntu/install_clang_format.sh
- name: Download dependencies
shell: bash
run: |
bash tools/dev/download_dependencies.sh
- name: Configure project
shell: bash
run: |
bash tools/backend/configure_openmp.sh
- name: Check style
shell: bash
run: |
bash tools/dev/check_code_style.sh
clangtidy:
name: "Clang-Tidy"
runs-on: ubuntu-22.04

steps:
Expand Down Expand Up @@ -40,7 +77,8 @@ jobs:
run: |
bash tools/build.sh Debug
Cppcheck:
cppcheck:
name: "Cppcheck"
runs-on: ubuntu-22.04

steps:
Expand Down Expand Up @@ -70,3 +108,19 @@ jobs:
shell: bash
run: |
bash tools/build.sh Debug
checklint:
if: always()

needs:
- clangformat
- clangtidy
- cppcheck

name: "Check Lint"
runs-on: ubuntu-22.04

steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
41 changes: 0 additions & 41 deletions .github/workflows/style.yml

This file was deleted.

Loading

0 comments on commit 0cde9da

Please sign in to comment.