diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml deleted file mode 100644 index 5f27d50..0000000 --- a/.github/workflows/CI.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: CI -on: - 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 }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - version: - - '1.7' - - 'nightly' - os: - - ubuntu-latest - arch: - - x64 - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v1 - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 - docs: - name: Documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: '1' - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-docdeploy@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - - run: | - julia --project=docs -e ' - using Documenter: DocMeta, doctest - using CompTime - DocMeta.setdocmeta!(CompTime, :DocTestSetup, :(using CompTime); recursive=true) - doctest(CompTime)' 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/julia_ci.yml b/.github/workflows/julia_ci.yml new file mode 100644 index 0000000..9dabe35 --- /dev/null +++ b/.github/workflows/julia_ci.yml @@ -0,0 +1,50 @@ +name: Julia CI/CD + +on: + schedule: + - cron: 0 0 * * * + push: + branches: ["main"] + tags: ["*"] + pull_request: + workflow_dispatch: + inputs: + action: + description: "Action" + required: true + default: "test" + type: choice + options: + - test + - release + version: + description: "Tag and release version:" + required: false + +permissions: + actions: read + checks: read + contents: write + deployments: read + discussions: read + issues: read + packages: read + pages: read + pull-requests: write + repository-projects: read + security-events: read + statuses: read + +jobs: + CI: + if: github.event_name == 'pull_request' || github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.action == 'test') + uses: AlgebraicJulia/.github/.github/workflows/julia_ci.yml@main + secrets: inherit + CompatHelper: + if: github.event_name == 'schedule' + uses: AlgebraicJulia/.github/.github/workflows/julia_compat.yml@main + secrets: inherit + Release: + if: github.event_name == 'workflow_dispatch' && inputs.action == 'release' && inputs.version != '' + uses: AlgebraicJulia/.github/.github/workflows/julia_release.yml@main + secrets: inherit