-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from LecrisUT/ci/GH-Action
ci: Implement more GitHub actions
- Loading branch information
Showing
19 changed files
with
224 additions
and
51 deletions.
There are no files selected for viewing
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,41 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
uses: ./.github/workflows/step_pre-commit.yaml | ||
|
||
tests: | ||
needs: [ pre-commit ] | ||
uses: ./.github/workflows/step_test.yaml | ||
permissions: | ||
contents: read | ||
checks: write | ||
pull-requests: write | ||
|
||
docs: | ||
needs: [ pre-commit ] | ||
uses: ./.github/workflows/step_docs.yaml | ||
|
||
pass: | ||
needs: [ pre-commit, tests, docs ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check all CI jobs | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
if: always() |
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
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,33 @@ | ||
name: docs | ||
run-name: Run documentation tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
doc-test: | ||
name: Sphinx-${{ matrix.builder }} | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental || false }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
builder: [ linkcheck, html ] | ||
include: | ||
# Run default html builder with warnings as error | ||
- builder: html | ||
args: -W | ||
# TODO: Fix documentation and warnings | ||
experimental: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- name: Install the project and docs dependencies | ||
run: pip install -e .[docs] | ||
- name: Run sphinx builder ${{ matrix.builder }} | ||
run: sphinx-build -b ${{ matrix.builder }} ${{ matrix.args }} ./docs ./docs/_build |
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,19 @@ | ||
name: pre-commit | ||
run-name: Run pre-commits | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pre-commit: | ||
name: pre-commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/[email protected] |
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,73 @@ | ||
name: test | ||
run-name: Run tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tests: | ||
name: CMake ${{ matrix.cmake }} | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/lecrisut/dev-env:main | ||
continue-on-error: ${{ matrix.experimental || false }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cmake: ["3.20", "latest", "latestrc"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
# Note: Proper solution is: https://github.com/actions/runner/issues/2033#issuecomment-1598547465 | ||
- name: Temporary fix for git permissions | ||
run: | | ||
git config --global --add safe.directory "*" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions Bot" | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
# TODO: This will be migrated to standalone actions | ||
- name: Setup tmt environment | ||
run: dnf install -y tmt tmt+report-junit | ||
- uses: lukka/get-cmake@latest | ||
with: | ||
cmakeVersion: ${{ matrix.cmake }} | ||
- name: Build and test native CMake | ||
run: | | ||
# Not running presets because of minimum CMake version being tested | ||
cmake -B ./build | ||
ctest --test-dir ./build --output-on-failure | ||
echo "CMakeExtraUtils_ROOT=$(pwd)/build" >> $GITHUB_ENV | ||
# TODO: This will be migrated to standalone actions | ||
- name: Run tmt tests | ||
run: > | ||
tmt --root ./test run --all provision -h local report -h junit --file report.xml | ||
- name: Upload Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: JUnit-CMake-${{ matrix.cmake }} | ||
path: report.xml | ||
report: | ||
name: Report JUnit | ||
needs: [ tests ] | ||
permissions: | ||
contents: read | ||
checks: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download test results | ||
uses: actions/download-artifact@v4 | ||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
files: "*/report.xml" | ||
large_files: true | ||
report_individual_runs: true | ||
report_suite_logs: any | ||
if: always() |
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
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.25) | ||
cmake_minimum_required(VERSION 3.20) | ||
|
||
project(TestProvider VERSION 0.0.0) | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.25) | ||
cmake_minimum_required(VERSION 3.20) | ||
|
||
project(TestUser VERSION 0.0.0) | ||
|
||
|
Oops, something went wrong.