-
Notifications
You must be signed in to change notification settings - Fork 4
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 #1 from SKopecz/hr/package
create package infrastructure and CI tests
- Loading branch information
Showing
20 changed files
with
434 additions
and
90 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,7 @@ | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "monthly" |
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,115 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.os }} - Julia ${{ matrix.version }} - ${{ github.event_name }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- '1' | ||
- '1.8' | ||
os: | ||
- ubuntu-latest | ||
include: | ||
- version: '1' | ||
os: macOS-latest | ||
- version: '1' | ||
os: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ matrix.version }} | ||
- uses: julia-actions/cache@v1 | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
env: | ||
GKSwstype: "100" # for Plots/GR | ||
- uses: julia-actions/julia-runtest@v1 | ||
env: | ||
GKSwstype: "100" # for Plots/GR | ||
- uses: julia-actions/julia-processcoverage@v1 | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
file: lcov.info | ||
# The standard setup of Coveralls is just annoying for parallel builds, see, e.g., | ||
# https://github.com/trixi-framework/Trixi.jl/issues/691 | ||
# https://github.com/coverallsapp/github-action/issues/47 | ||
# https://github.com/coverallsapp/github-action/issues/67 | ||
# This standard setup is reproduced below for completeness. | ||
# - uses: coverallsapp/github-action@master | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# flag-name: run-${{ matrix.version }}-${{ github.run_id }} | ||
# parallel: true | ||
# path-to-lcov: ./lcov.info | ||
# Instead, we use a more tedious approach: | ||
# - Store all individual coverage files as artifacts (directly below) | ||
# - Download and merge individual coverage reports in another step | ||
# - Upload only the merged coverage report to Coveralls | ||
- shell: bash | ||
run: | | ||
cp ./lcov.info ./lcov-${{ matrix.version }}-${{ github.run_id }}.info | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: lcov-${{ matrix.version }}-${{ github.run_id }} | ||
path: ./lcov-${{ matrix.version }}-${{ github.run_id }}.info | ||
|
||
finish: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
# The standard setup of Coveralls is just annoying for parallel builds, see, e.g., | ||
# https://github.com/trixi-framework/Trixi.jl/issues/691 | ||
# https://github.com/coverallsapp/github-action/issues/47 | ||
# https://github.com/coverallsapp/github-action/issues/67 | ||
# This standard setup is reproduced below for completeness. | ||
# - name: Coveralls Finished | ||
# uses: coverallsapp/github-action@master | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# parallel-finished: true | ||
# Instead, we use the more tedious approach described above. | ||
# At first, we check out the repository and download all artifacts | ||
# (and list files for debugging). | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v3 | ||
- run: ls -R | ||
# Next, we merge the individual coverage files and upload | ||
# the combined results to Coveralls. | ||
- name: Merge lcov files using Coverage.jl | ||
shell: julia --color=yes {0} | ||
run: | | ||
using Pkg | ||
Pkg.activate(temp=true) | ||
Pkg.add("Coverage") | ||
using Coverage | ||
coverage = LCOV.readfolder(".") | ||
for cov in coverage | ||
cov.filename = replace(cov.filename, "\\" => "/") | ||
end | ||
filter!(c -> basename(c.filename) != "precompile.jl", coverage) | ||
coverage = merge_coverage_counts(coverage) | ||
@show covered_lines, total_lines = get_summary(coverage) | ||
LCOV.writefile("./lcov.info", coverage) | ||
# TODO: Activate this when the package becomes public | ||
# - uses: coverallsapp/github-action@master | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# path-to-lcov: ./lcov.info | ||
# Upload merged coverage data as artifact for debugging | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: lcov | ||
path: ./lcov.info | ||
# That's it | ||
- run: echo "Finished testing" |
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,26 @@ | ||
name: CompatHelper | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
issues: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
julia-version: [1] | ||
julia-arch: [x86] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
version: ${{ matrix.julia-version }} | ||
- name: Pkg.add("CompatHelper") | ||
run: julia -e 'using Pkg; Pkg.add("CompatHelper")' | ||
- name: CompatHelper.main() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "docs", "examples", "test"])' |
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,32 @@ | ||
name: Doc Preview Cleanup | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
doc-preview-cleanup: | ||
# Do not run on forks to avoid authorization errors | ||
# Source: https://github.community/t/have-github-action-only-run-on-master-repo-and-not-on-forks/140840/18 | ||
if: github.repository_owner == 'SKopecz' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
|
||
- name: Delete preview and history | ||
shell: bash | ||
run: | | ||
git config user.name "Documenter.jl" | ||
git config user.email "[email protected]" | ||
git rm -rf --ignore-unmatch "previews/PR$PRNUM" | ||
git commit -m "delete preview" --allow-empty | ||
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) | ||
env: | ||
PRNUM: ${{ github.event.number }} | ||
|
||
- name: Push changes | ||
run: | | ||
git push --force origin gh-pages-new:gh-pages |
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,13 @@ | ||
name: Spell Check | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
typos-check: | ||
name: Spell Check with Typos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
- name: Check spelling | ||
uses: crate-ci/[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,15 @@ | ||
name: TagBot | ||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
jobs: | ||
TagBot: | ||
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: JuliaRegistries/TagBot@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ssh: ${{ secrets.DOCUMENTER_KEY }} |
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,9 +1,27 @@ | ||
name = "PositiveIntegrators" | ||
uuid = "d1b20bf0-b083-4985-a874-dc5121669aa5" | ||
authors = ["Stefan Kopecz, Hendrik Ranocha, and contributors"] | ||
version = "0.1.0" | ||
|
||
[deps] | ||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" | ||
DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" | ||
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" | ||
Kwonly = "18d08c8c-0732-55ee-a446-91a51d7b4206" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" | ||
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" | ||
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" | ||
Reexport = "189a3867-3050-52da-a836-e630ba90ab69" | ||
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" | ||
SimpleUnPack = "ce78b400-467f-4804-87d8-8f486da07d0a" | ||
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" | ||
|
||
[compat] | ||
FastBroadcast = "0.2" | ||
julia = "1.8" | ||
Kwonly = "0.1" | ||
LinearSolve = "2" | ||
MuladdMacro = "0.2" | ||
OrdinaryDiffEq = "6" | ||
Reexport = "1" | ||
SciMLBase = "2" | ||
SimpleUnPack = "1" |
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,5 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
|
||
[compat] | ||
Documenter = "1" |
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
Oops, something went wrong.