Skip to content

Commit

Permalink
Migration to GitHub from GitLab
Browse files Browse the repository at this point in the history
  • Loading branch information
JulStraus committed Jun 19, 2024
1 parent 81f5791 commit dcc765a
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 130 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 3
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Edit the following line to reflect the actual name of the GitHub Secret containing your private key
ssh: ${{ secrets.DOCUMENTER_KEY }}
# ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }}
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI
on:
push:
branches:
- main
- release-*
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Since EnergyModelsGUI doesn't have binary dependencies,
# only test on a subset of possible platforms.
include:
- version: '1' # The latest point-release (Linux)
os: ubuntu-latest
arch: x64
- version: '1' # The latest point-release (Windows)
os: windows-latest
arch: x64
- version: '1.9' # 1.9
os: ubuntu-latest
arch: x64
- version: '1.9' # 1.9
os: ubuntu-latest
arch: x86
- version: 'nightly'
os: ubuntu-latest
arch: x64
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v3
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 }}-
- run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
prefix: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e
depwarn: error
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
file: lcov.info
26 changes: 26 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Documentation
on:
push:
branches: [main]
tags: '*'
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1'
- name: Install dependencies
shell: julia --color=yes --project=docs/ {0}
run: |
using Pkg
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' 'Pkg.develop(PackageSpec(path=pwd()))
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' 'Pkg.instantiate()
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=docs/ docs/make.jl
23 changes: 20 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
### Julia ###

# Files generated by invoking Julia with --code-coverage
*.jl.*.cov
*.jl.cov

# Files generated by invoking Julia with --track-allocation
*.jl.mem

# File generated by Pkg, the package manager, based on a corresponding Project.toml
# It records a fixed state of all packages used by the project. As such, it should not be
# committed for packages, but should be committed for applications that require a static
# environment.
/Manifest.toml

# Internal files for testing the system locally
*.geojson
*startup.jl
test/test_coverage.jl
/Manifest.toml
/test/test_coverage.jl
/dev

# Build artifacts for creating documentation generated by the Documenter package
/docs/Manifest.toml
/examples/Manifest.toml
/examples/exported_files
/test/Manifest.toml
/docs/build/
/dev
/docs/src/manual/NEWS.md

# Exported files when running the tests
/examples/exported_files
108 changes: 0 additions & 108 deletions .gitlab-ci.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ GeoMakie = "0.5.1"
GeometryBasics = "=0.4.10"
HTTP = "1.10.8"
ImageMagick = "1.3.1"
JuMP = "1.22.0"
Pkg = "1.10.0"
JuMP = "1.22"
Pkg = "1.9"
PrettyTables = "2.3.1"
TimeStruct = "0.8.0"
TimeStruct = "0.8"
XLSX = "0.10.1"
YAML = "0.4.9"
julia = "^1.9"
19 changes: 6 additions & 13 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,24 @@ using EnergyModelsGUI
const EMB = EnergyModelsBase
const EMGUI = EnergyModelsGUI

cd(dirname(@__FILE__)) # Make sure to be in the docs folder

# Copy the NEWS.md file
news = "src/manual/NEWS.md"
news = "docs/src/manual/NEWS.md"
if isfile(news)
rm(news)
end
cp("../NEWS.md", news)
cp("NEWS.md", news)

DocMeta.setdocmeta!(
EnergyModelsGUI, :DocTestSetup, :(using EnergyModelsGUI); recursive=true
)

makedocs(;
sitename="EnergyModelsGUI.jl",
repo="https://gitlab.sintef.no/clean_export/energymodelsgui.jl/blob/{commit}{path}#{line}",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://clean_export.pages.sintef.no/energymodelsgui.jl/",
repolink="https://clean_export.pages.sintef.no/energymodelsgui.jl/",
edit_link="main",
assets=String[],
ansicolor=true,
),
modules=[EnergyModelsGUI],
pages=[
Expand All @@ -51,9 +47,6 @@ makedocs(;
checkdocs=:all,
)

# Documenter can also automatically deploy documentation to gh-pages.
# See "Hosting Documentation" and deploydocs() in the Documenter manual
# for more information.
#=deploydocs(
repo = "<repository url>"
)=#
deploydocs(;
repo = "github.com/EnergyModelsX/EnergyModelsGUI.jl.git",
)
6 changes: 3 additions & 3 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ EnergyModelsBase = "0.7.0"
EnergyModelsGeography = "0.9.0"
EnergyModelsInvestments = "0.6.0"
EnergyModelsRenewableProducers = "0.6.0"
HiGHS = "v1.9.0"
JuMP = "1.22.0"
HiGHS = "v1.9"
JuMP = "1.22"
JuliaFormatter = "1.0.56"
Pkg = "1.10.0"
Pkg = "1.9"
PrettyTables = "2.3.1"
Test = "^1.9"
TimeStruct = "0.8.0"
Expand Down

0 comments on commit dcc765a

Please sign in to comment.