From b5d25f50df4dcdf68f99ae25681cc5a1b0e9be7a Mon Sep 17 00:00:00 2001 From: Johannes Feist Date: Sun, 9 Jun 2024 11:00:10 +0200 Subject: [PATCH] update github actions --- .github/workflows/CI.yml | 47 +++++++++++++++------------------- .github/workflows/register.yml | 16 ++++++++++++ 2 files changed, 37 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/register.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c8e70b2..b52628a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,7 +1,15 @@ name: CI on: - - push - - pull_request + push: + branches: + - main + tags: ['*'] + pull_request: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} @@ -11,12 +19,11 @@ jobs: matrix: version: - '1' - - '1.3' + - '1.6' + - '1.10' - 'nightly' os: - ubuntu-latest - - macOS-latest - - windows-latest arch: - x64 steps: @@ -25,42 +32,30 @@ jobs: 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/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v2 with: - file: lcov.info + files: lcov.info docs: name: Documentation runs-on: ubuntu-latest + permissions: + contents: write 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()' + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-docdeploy@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | julia --project=docs -e ' using Documenter: DocMeta, doctest using SymArrays DocMeta.setdocmeta!(SymArrays, :DocTestSetup, :(using SymArrays); recursive=true) doctest(SymArrays)' - - run: julia --project=docs docs/make.jl - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/register.yml b/.github/workflows/register.yml new file mode 100644 index 0000000..5b7cd3b --- /dev/null +++ b/.github/workflows/register.yml @@ -0,0 +1,16 @@ +name: Register Package +on: + workflow_dispatch: + inputs: + version: + description: Version to register or component to bump + required: true +jobs: + register: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: julia-actions/RegisterAction@latest + with: + token: ${{ secrets.GITHUB_TOKEN }}