flake: Update #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 Variables | |
| 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: | |
| name: Run Checks | |
| secrets: inherit | |
| uses: ./.github/workflows/checks.yaml | |
| paper: | |
| name: Build Paper Draft | |
| secrets: inherit | |
| uses: ./.github/workflows/paper.yaml | |
| nix: | |
| name: Build with Nix | |
| secrets: inherit | |
| uses: ./.github/workflows/nix.yaml | |
| prepare: | |
| name: Prepare Docker Images | |
| needs: [setup] | |
| secrets: inherit | |
| uses: ./.github/workflows/prepare.yaml | |
| with: | |
| docker_image: ${{ needs.setup.outputs.docker_image }} | |
| build: | |
| name: Build from Source | |
| needs: [setup, prepare] | |
| secrets: inherit | |
| uses: ./.github/workflows/build.yaml | |
| with: | |
| docker_image: ${{ needs.setup.outputs.docker_image }} | |
| test: | |
| name: Run Tests | |
| needs: [setup, build] | |
| secrets: inherit | |
| uses: ./.github/workflows/test.yaml | |
| with: | |
| docker_image: ${{ needs.setup.outputs.docker_image }} | |
| packaging-docker: | |
| name: Build Docker Images | |
| needs: [setup, test, prepare] | |
| secrets: inherit | |
| uses: ./.github/workflows/packaging-docker.yaml | |
| with: | |
| docker_image: ${{ needs.setup.outputs.docker_image }} | |
| packaging-nix: | |
| name: Bundle Artifacts with Nix | |
| needs: [setup, nix] | |
| secrets: inherit | |
| uses: ./.github/workflows/packaging-nix.yaml | |
| with: | |
| docker_image: ${{ needs.setup.outputs.docker_image }} | |
| deploy: | |
| name: Deploy Docker Images | |
| needs: [setup, packaging-docker] | |
| secrets: inherit | |
| uses: ./.github/workflows/deploy.yaml | |
| with: | |
| docker_image: ${{ needs.setup.outputs.docker_image }} | |
| is_version_tag: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
| deploy-nix: | |
| name: Deploy Nix Artifacts | |
| needs: [setup, packaging-nix] | |
| secrets: inherit | |
| uses: ./.github/workflows/deploy-nix.yaml | |
| with: | |
| docker_image: ${{ needs.setup.outputs.docker_image }} | |
| is_version_tag: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
| all: | |
| name: All prerequisites completed | |
| needs: | |
| - setup | |
| - checks | |
| - paper | |
| - nix | |
| - prepare | |
| - build | |
| - test | |
| - packaging-docker | |
| - packaging-nix | |
| - deploy | |
| - deploy-nix | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Dependency barrier | |
| run: echo "All prerequisite jobs finished." | |
| tag-minor-release: | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
| needs: | |
| - all | |
| uses: ./.github/workflows/tag-minor-release.yaml | |
| secrets: inherit |