From 3d8506651927d55b94a8d89fbe12bce66920b396 Mon Sep 17 00:00:00 2001 From: Joey Carpinelli Date: Fri, 3 Jan 2025 23:11:43 -0500 Subject: [PATCH] Adds back workflows and Dev Container configuration files --- .devcontainer/devcontainer.json | 20 +++++++++++++ .github/workflows/CI.yml | 30 ++++++++++++++++++++ .github/workflows/CompatHelper.yml | 44 +++++++++++++++++++++++++++++ .github/workflows/Documentation.yml | 32 +++++++++++++++++++++ .github/workflows/Register.yml | 16 +++++++++++ .github/workflows/TagBot.yml | 28 ++++++++++++++++++ 6 files changed, 170 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/workflows/CI.yml create mode 100644 .github/workflows/CompatHelper.yml create mode 100644 .github/workflows/Documentation.yml create mode 100644 .github/workflows/Register.yml create mode 100644 .github/workflows/TagBot.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..9fe168c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,20 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/JuliaLang/devcontainer-templates/tree/main/src/julia +{ + "name": "Julia", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + // A Feature to install Julia via juliaup. More info: https://github.com/JuliaLang/devcontainer-features/tree/main/src/julia. + "ghcr.io/julialang/devcontainer-features/julia:1": {}, + "ghcr.io/devcontainers/features/python:1": { + "installJupyterlab": true + }, + "ghcr.io/devcontainers-contrib/features/starship:1": {}, + "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {} + }, + "postCreateCommand": { + "Initialize Starship Prompt": "echo eval '$(starship init bash)' >> ~/.bashrc" + } +} \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..d5ba7e1 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,30 @@ +name: CI +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + actions: write + contents: read + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + julia-version: ["lts"] + julia-arch: [x86] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.julia-version }} + arch: ${{ matrix.julia-arch }} + # - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - run: julia --project -e 'import Pkg; Pkg.update(); Pkg.build()' + - uses: julia-actions/julia-runtest@v1 diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml new file mode 100644 index 0000000..ec14a44 --- /dev/null +++ b/.github/workflows/CompatHelper.yml @@ -0,0 +1,44 @@ +name: CompatHelper +on: + schedule: + - cron: 0 0 * * * + workflow_dispatch: +permissions: + contents: write + pull-requests: write +jobs: + CompatHelper: + runs-on: ubuntu-latest + steps: + - name: Check if Julia is already available in the PATH + id: julia_in_path + run: which julia + continue-on-error: true + - name: Install Julia, but only if it is not already available in the PATH + uses: julia-actions/setup-julia@v2 + with: + version: "lts" + arch: ${{ runner.arch }} + if: steps.julia_in_path.outcome != 'success' + - name: "Add the General registry via Git" + run: | + import Pkg + ENV["JULIA_PKG_SERVER"] = "" + Pkg.Registry.add("General") + shell: julia --color=yes {0} + - name: "Install CompatHelper" + run: | + import Pkg + name = "CompatHelper" + uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" + version = "3" + Pkg.add(; name, uuid, version) + shell: julia --color=yes {0} + - name: "Run CompatHelper" + run: | + import CompatHelper + CompatHelper.main() + shell: julia --color=yes {0} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml new file mode 100644 index 0000000..9a18d7e --- /dev/null +++ b/.github/workflows/Documentation.yml @@ -0,0 +1,32 @@ +name: Documentation + +on: + push: + branches: + - main # update to match your development branch (master, main, dev, trunk, ...) + tags: "*" + pull_request: + +jobs: + build: + permissions: + actions: write + contents: write + pull-requests: read + statuses: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: "lts" + - uses: quarto-dev/quarto-actions/setup@v2 + - name: Install Jupyter + run: python -m pip install jupyter + # - uses: julia-actions/cache@v2 + - name: Install dependencies + run: julia --project=docs/ -e 'using Pkg; Pkg.develop([PackageSpec(url="https://github.com/cadojo/DocumenterQuarto.jl"), PackageSpec(path=pwd())]); Pkg.update(); Pkg.build()' + - name: Build and deploy + env: + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key + run: julia --project=docs/ docs/make.jl diff --git a/.github/workflows/Register.yml b/.github/workflows/Register.yml new file mode 100644 index 0000000..97bf97a --- /dev/null +++ b/.github/workflows/Register.yml @@ -0,0 +1,16 @@ +name: Register + +on: + workflow_dispatch: + +jobs: + release: + name: Register Package + runs-on: ubuntu-latest + steps: + - uses: peter-evans/commit-comment@v3 + with: + body: | + @JuliaRegistrator register" + + This comment was generated with `commit-comment` and [`Register.yml`](/.github/workflows/Register.yml). diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml new file mode 100644 index 0000000..85ad9c4 --- /dev/null +++ b/.github/workflows/TagBot.yml @@ -0,0 +1,28 @@ +name: TagBot + +on: + schedule: + - cron: 0 12 * * * + workflow_dispatch: + +jobs: + build: + permissions: + actions: write + contents: write + pull-requests: read + statuses: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: "1" + - uses: julia-actions/cache@v2 + - name: Install dependencies + run: julia -e 'using Pkg; Pkg.add(url="https://github.com/cadojo/ExperimentalTagBot.jl")' + - name: Build and deploy + env: + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key + PACKAGE: ${{ github.event.repository.name }} + run: julia -e 'import GitHub as GH; auth = GH.authenticate(readchomp(`gh auth token`)); import ExperimentalTagBot; ExperimentalTagBot.create_releases(replace(ENV["PACKAGE"], ".jl"=>""); auth = auth)'