Skip to content

Commit

Permalink
Adds back workflows and Dev Container configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
cadojo committed Jan 4, 2025
1 parent dec2c99 commit 3d85066
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
30 changes: 30 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -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
44 changes: 44 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -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 }}
32 changes: 32 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions .github/workflows/Register.yml
Original file line number Diff line number Diff line change
@@ -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).
28 changes: 28 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -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)'

0 comments on commit 3d85066

Please sign in to comment.