Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d51a6af
Include Github Action scripts
riteshk001 Jul 1, 2026
1d5034a
fix(gh-actions): lower case
al3xa23 Jul 1, 2026
8562fa2
fix(gh-actions): lower case of repo_owner
al3xa23 Jul 1, 2026
c0cf0d9
fix(gh-actions): lower case of villasframework
al3xa23 Jul 1, 2026
1f339cf
fix(gh-actions): lower case of villasframework in test
al3xa23 Jul 1, 2026
cc98b74
Include integration tests in github actions
riteshk001 Jul 3, 2026
0475d0d
Include integration tests in github actions
riteshk001 Jul 3, 2026
c21da2e
fix: Test packaging process without nix builds
riteshk001 Jul 5, 2026
7c0eb38
fix: create separate job for arm64 docker image
riteshk001 Jul 6, 2026
613d53d
fix: fix job name
riteshk001 Jul 6, 2026
5206880
fix: whitespace issue
riteshk001 Jul 6, 2026
e5548fa
fix: job name
riteshk001 Jul 6, 2026
ef5fa36
fix: fix faulty docker file path
riteshk001 Jul 6, 2026
f166670
fix: fix syntax in deploy.yml
riteshk001 Jul 7, 2026
e24f4bf
fix: fix workflow auth error in build.yml
riteshk001 Jul 13, 2026
8e31781
fix: Change conditions to publish docker images
riteshk001 Jul 13, 2026
438390c
fix: fix issue with env variable usage for version tag checks
riteshk001 Jul 13, 2026
65f3b26
fix: fix issue with env variable usage for version tag checks
riteshk001 Jul 13, 2026
32c8507
fix: fix issue with env variable usage for version tag checks
riteshk001 Jul 13, 2026
604a453
ci(docker): sanitize PR ref tags and use imagetools for latest
leonardocarreras Jul 22, 2026
b9081d6
ci: activate nix build and packaging jobs
leonardocarreras Jul 22, 2026
7d4821f
ci: activate pre-commit test job
leonardocarreras Jul 22, 2026
0777b6f
ci: cancel in-progress runs per PR
leonardocarreras Jul 22, 2026
c9f324d
ci: run push only on master and tags to avoid duplicate PR runs
leonardocarreras Jul 22, 2026
dbaa534
ci: derive image name from repository owner so forks push to their ow…
leonardocarreras Jul 22, 2026
91bac29
ci: update actions to latest majors (drop deprecated Node 20)
leonardocarreras Jul 22, 2026
9bd8d0a
ci: skip dev image rebuild when content unchanged (always rebuild on …
leonardocarreras Jul 22, 2026
7b6cbd2
ci: make cachix cache name configurable per repository
leonardocarreras Jul 22, 2026
0802ec8
ci: split prepare-independent jobs into parallel checks workflow
leonardocarreras Jul 22, 2026
3e9cd6a
ci: run nix jobs on runner with install-nix/cachix actions
leonardocarreras Jul 22, 2026
7be7879
ci: set SPDX copyright year to 2026
leonardocarreras Jul 22, 2026
b8eb029
ci: move nix build into its own workflow
leonardocarreras Jul 22, 2026
79287d0
ci: pull prebuilt deps from villas cache in nix builds
leonardocarreras Jul 22, 2026
b6937af
ci: trigger latest on version tags, manual otherwise
leonardocarreras Jul 22, 2026
eb3c145
ci: cache docker layers to speed up image builds
leonardocarreras Jul 22, 2026
96ea520
ci: add scheduled cleanup of old PR and branch images
leonardocarreras Jul 22, 2026
933635d
build(docker): prefer Azure Ubuntu mirror to avoid apt throttling
leonardocarreras Jul 22, 2026
fc14413
ci: match cmake parallelism to runner cores
leonardocarreras Jul 22, 2026
819e64c
ci: include top-level packaging patches in dev image hash
leonardocarreras Jul 22, 2026
4e6d45c
ci: reuse prepare dev layers in app image build cache
leonardocarreras Jul 22, 2026
9aade0b
ci: cache fedora compilation with ccache
leonardocarreras Jul 22, 2026
fb29529
ci: sanitize ref tags in packaging/deploy and fix dev-vscode alias
leonardocarreras Jul 22, 2026
6a0a6ac
ci: reuse build:source artifact in test jobs instead of recompiling
leonardocarreras Jul 22, 2026
9889c19
ci: split packaging into docker and nix; deploy needs only docker
leonardocarreras Jul 22, 2026
4c047c4
ci: fix skopeo registries.conf v1/v2 clash in pkg:nix:docker
leonardocarreras Jul 22, 2026
a398d9e
ci: bump actions/cache to v6 to drop Node 20 runtime
leonardocarreras Jul 22, 2026
6c1db17
ci: cap nix artifact retention at 90 days (repo max)
leonardocarreras Jul 22, 2026
ae156f4
build(docker): declare app-stage ARGs to fix UndefinedVar lint
leonardocarreras Jul 22, 2026
a820a60
ci: publish multi-arch nix manifest and attach arx/rpm to releases
leonardocarreras Jul 22, 2026
6ea39f7
ci: trim obvious comments, keep non-obvious rationale
leonardocarreras Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0

name: Build

on:
workflow_call:
inputs:
docker_image:
required: true
type: string

env:
CMAKE_BUILD_OPTS: --parallel $(nproc)
CMAKE_EXTRA_OPTS: -DCMAKE_BUILD_TYPE=Release
CCACHE_DIR: ${{ github.workspace }}/.ccache

permissions:
contents: read
packages: write

jobs:
build-source:
name: "build:source [${{ matrix.distro }}]"
runs-on: ubuntu-latest
container:
image: ${{ inputs.docker_image }}/dev-${{ matrix.image_name }}:${{ github.sha }}
options: --user root
strategy:
fail-fast: false
matrix:
include:
- distro: fedora
image_name: fedora
cmake_extra_opts: >-
-DVILLAS_COMPILE_WARNING_AS_ERROR=ON
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- distro: fedora-minimal
image_name: fedora-minimal
cmake_extra_opts: >-
-DVILLAS_COMPILE_WARNING_AS_ERROR=ON
-DWITH_API=OFF
-DWITH_CLIENTS=OFF
-DWITH_CONFIG=OFF
-DWITH_DOC=OFF
-DWITH_FPGA=OFF
-DWITH_GRAPHVIZ=OFF
-DWITH_HOOKS=OFF
-DWITH_LUA=OFF
-DWITH_OPENMP=OFF
-DWITH_PLUGINS=OFF
-DWITH_SRC=OFF
-DWITH_TESTS=OFF
-DWITH_TOOLS=OFF
-DWITH_WEB=OFF
-DCMAKE_MODULE_PATH=/usr/local/lib64/cmake
-DCMAKE_PREFIX_PATH=/usr/local
- distro: debian
image_name: debian
- distro: rocky
image_name: rocky
- distro: rocky9
image_name: rocky9
- distro: ubuntu
image_name: ubuntu
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
submodules: recursive

- name: ccache
if: matrix.distro == 'fedora'
uses: actions/cache@v6
with:
path: ${{ github.workspace }}/.ccache
key: ccache-fedora-${{ github.sha }}
restore-keys: ccache-fedora-

- name: Configure
run: cmake -S . -B build ${{ matrix.cmake_extra_opts || env.CMAKE_EXTRA_OPTS }}

- name: Build
run: cmake --build build ${{ env.CMAKE_BUILD_OPTS }}

- uses: actions/upload-artifact@v7
with:
name: build-${{ matrix.distro }}
path: build/
retention-days: 7
70 changes: 70 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0

name: Checks

on:
workflow_call:

permissions:
contents: read

jobs:
build-openapi:
name: build:openapi
runs-on: ubuntu-latest
container:
image: node:24-alpine
steps:
- uses: actions/checkout@v7

- name: Lint OpenAPI spec
run: npx -y @redocly/cli lint --config doc/redocly.yaml doc/openapi/openapi.yaml

- name: Build OpenAPI docs
run: npx -y @redocly/cli build-docs --config doc/redocly.yaml doc/openapi/openapi.yaml --output openapi.html

- uses: actions/upload-artifact@v7
with:
name: openapi
path: openapi.html

pre-commit:
name: test:pre-commit
runs-on: ubuntu-latest
container:
image: python:3.12.10-slim-bookworm
options: --user root
steps:
- name: Install git and ruby
run: apt-get update && apt-get -y install git ruby

- uses: actions/checkout@v7

- name: Add Git safe directory
run: git config --global --add safe.directory '*'

- name: Install pre-commit
run: pip install --no-cache-dir pre-commit

- name: Run pre-commit
run: pre-commit run --all-files

- name: Upload log
if: failure()
uses: actions/upload-artifact@v7
with:
name: pre-commit-log
path: /github/home/.cache/pre-commit/pre-commit.log

reuse:
name: test:reuse
runs-on: ubuntu-latest
container:
image: fsfe/reuse:latest
options: --entrypoint ""
steps:
- uses: actions/checkout@v7

- name: Run REUSE lint
run: reuse lint
91 changes: 91 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0

name: CI

on:
push:
branches: [master]
tags: ['v*']
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
setup:
name: setup
runs-on: ubuntu-latest
outputs:
docker_image: ${{ steps.image.outputs.docker_image }}
steps:
- name: Compute image name for the current repository
id: image
env:
OWNER: ${{ github.repository_owner }}
run: echo "docker_image=ghcr.io/${OWNER,,}/villas/node" >> "$GITHUB_OUTPUT"

checks:
uses: ./.github/workflows/checks.yml
secrets: inherit

nix:
uses: ./.github/workflows/nix.yml
secrets: inherit

prepare:
needs: [setup]
uses: ./.github/workflows/prepare.yml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
secrets: inherit

build:
needs: [setup, prepare]
uses: ./.github/workflows/build.yml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
secrets: inherit

test:
needs: [setup, build]
uses: ./.github/workflows/test.yml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
secrets: inherit

packaging-docker:
if: github.event_name != 'pull_request'
needs: [setup, test]
uses: ./.github/workflows/packaging-docker.yml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
secrets: inherit

packaging-nix:
if: github.event_name != 'pull_request'
needs: [setup, test]
uses: ./.github/workflows/packaging-nix.yml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
secrets: inherit

deploy:
if: github.event_name != 'pull_request'
needs: [setup, packaging-docker]
uses: ./.github/workflows/deploy.yml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
is_version_tag: ${{ startsWith(github.ref, 'refs/tags/v') }}
secrets: inherit

deploy-nix:
if: github.event_name != 'pull_request'
needs: [setup, packaging-nix]
uses: ./.github/workflows/deploy-nix.yml
with:
docker_image: ${{ needs.setup.outputs.docker_image }}
is_version_tag: ${{ startsWith(github.ref, 'refs/tags/v') }}
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0

name: Cleanup

on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:

permissions:
packages: write

jobs:
cleanup-packages:
name: cleanup:packages
runs-on: ubuntu-latest
steps:
# Deletes PR, branch, SHA and content-hash image versions older than
# 14 days. Version tags (v*), master and latest are kept forever.
# Starts in dry-run: review one run's log, then set dry-run to false.
- uses: dataaxiom/ghcr-cleanup-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
packages: ^villas/node(/.*)?$
expand-packages: true
use-regex: true
exclude-tags: ^(latest|master.*|v.*)$
older-than: 14 days
delete-untagged: true
dry-run: true
Loading