From 87bb29ba732db92e93bee6fbcbbf8a30ac90e6ac Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 29 Dec 2020 18:48:41 -0500 Subject: [PATCH] Reorganize the CI workflow files --- .github/workflows/CompatHelper.yml | 16 ------- .github/workflows/ci-coverage.yml | 54 --------------------- .github/workflows/ci.yml | 76 ++++++++++++++++++++++++++++++ .github/workflows/docs.yml | 48 ------------------- README.md | 22 +++++++-- 5 files changed, 93 insertions(+), 123 deletions(-) delete mode 100644 .github/workflows/CompatHelper.yml delete mode 100644 .github/workflows/ci-coverage.yml delete mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml deleted file mode 100644 index cba9134..0000000 --- a/.github/workflows/CompatHelper.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: CompatHelper -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: -jobs: - CompatHelper: - runs-on: ubuntu-latest - steps: - - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - - name: CompatHelper.main() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} - run: julia -e 'using CompatHelper; CompatHelper.main()' diff --git a/.github/workflows/ci-coverage.yml b/.github/workflows/ci-coverage.yml deleted file mode 100644 index f9a990c..0000000 --- a/.github/workflows/ci-coverage.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: CI (code coverage) -on: - pull_request: - branches: - - master - push: - branches: - - master - tags: '*' -defaults: - run: - shell: bash -jobs: - test-code-coverage: - name: Julia ${{ matrix.version }}/${{ matrix.os }}/${{ matrix.arch }}/${{ matrix.threads }} threads/${{ github.event_name }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - arch: - - x64 - os: - - ubuntu-latest - threads: - - '1' - - '2' - version: - - '1' # automatically expands to the latest stable 1.x release of Julia - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 - with: - coverage: true - env: - JULIA_NUM_THREADS: ${{ matrix.threads }} - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 - with: - file: lcov.info diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8f7d6f..9440dae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,3 +55,79 @@ jobs: coverage: false env: JULIA_NUM_THREADS: ${{ matrix.threads }} + test-code-coverage: + name: Julia ${{ matrix.version }}/${{ matrix.os }}/${{ matrix.arch }}/${{ matrix.threads }} threads/${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + arch: + - x64 + os: + - ubuntu-latest + threads: + - '1' + - '2' + version: + - '1' # automatically expands to the latest stable 1.x release of Julia + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + with: + coverage: true + env: + JULIA_NUM_THREADS: ${{ matrix.threads }} + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - run: | + julia --project=docs -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate()' + - run: julia --project=docs docs/make.jl + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + doctests: + name: Doctests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - run: | + julia --project=docs -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate()' + - run: | + julia --project=docs -e ' + using Documenter: doctest + using Octavian + doctest(Octavian)' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 6f6a4ae..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Docs -on: - pull_request: - branches: - - master - push: - branches: - - master - tags: '*' -defaults: - run: - shell: bash -jobs: - docs: - name: Documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: '1' - - run: | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' - - run: julia --project=docs docs/make.jl - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - doctests: - name: Doctests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: '1' - - run: | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' - - run: | - julia --project=docs -e ' - using Documenter: doctest - using Octavian - doctest(Octavian)' diff --git a/README.md b/README.md index 2084c8e..9a82bd8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,22 @@ # Octavian -[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaLinearAlgebra.github.io/Octavian.jl/stable) -[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaLinearAlgebra.github.io/Octavian.jl/dev) -[![CI](https://github.com/JuliaLinearAlgebra/Octavian.jl/workflows/CI/badge.svg)](https://github.com/JuliaLinearAlgebra/Octavian.jl/actions?query=workflow%3ACI) -[![CI (Julia nightly)](https://github.com/JuliaLinearAlgebra/Octavian.jl/workflows/CI%20(Julia%20nightly)/badge.svg)](https://github.com/JuliaLinearAlgebra/Octavian.jl/actions?query=workflow%3A%22CI+%28Julia+nightly%29%22) -[![Coverage](https://codecov.io/gh/JuliaLinearAlgebra/Octavian.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaLinearAlgebra/Octavian.jl) +[![Documentation (stable)][docs-stable-img]][docs-stable-url] +[![Documentation (dev)][docs-dev-img]][docs-dev-url] +[![Continuous Integration][ci-img]][ci-url] +[![Continuous Integration (Julia nightly)][ci-julia-nightly-img]][ci-julia-nightly-url] +[![Code Coverage][codecov-img]][codecov-url] + +[docs-stable-url]: https://JuliaLinearAlgebra.github.io/Octavian.jl/stable +[docs-dev-url]: https://JuliaLinearAlgebra.github.io/Octavian.jl/dev +[ci-url]: https://github.com/JuliaLinearAlgebra/Octavian.jl/actions?query=workflow%3ACI +[ci-julia-nightly-url]: https://github.com/JuliaLinearAlgebra/Octavian.jl/actions?query=workflow%3A%22CI+%28Julia+nightly%29%22 +[codecov-url]: https://codecov.io/gh/JuliaLinearAlgebra/Octavian.jl + +[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg "Documentation (stable)" +[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg "Documentation (dev)" +[ci-img]: https://github.com/JuliaLinearAlgebra/Octavian.jl/workflows/CI/badge.svg "Continuous Integration" +[ci-julia-nightly-img]: https://github.com/JuliaLinearAlgebra/Octavian.jl/workflows/CI%20(Julia%20nightly)/badge.svg "Continuous Integration (Julia nightly)" +[codecov-img]: https://codecov.io/gh/JuliaLinearAlgebra/Octavian.jl/branch/master/graph/badge.svg "Code Coverage" Standing on the shoulders of [Gaius](https://github.com/MasonProtter/Gaius.jl).