Skip to content

Renamed feelpp-project to feelpp/course-rom #3

Renamed feelpp-project to feelpp/course-rom

Renamed feelpp-project to feelpp/course-rom #3

Workflow file for this run

name: CI
on:
push:
branches:
- '**' # Push events on all branches
paths-ignore:
- '.github/workflows/init.yml'
- 'docs/**'
- 'package*.json'
- 'site.yml'
- 'generate-jupyter.sh'
- 'netlify*'
- '.github/workflows/docs.yml'
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 including semver
jobs:
build_code:
runs-on: self-ubuntu-22.04
name: Build, Install, Package code
if: "!contains(github.event.head_commit.message, 'code skip')"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
recursive: true
-
name: Build
run: |
cmake --preset default
cmake --build --preset default
-
name: Check
run: |
ctest --preset default
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
-
name: Package
run: |
cmake --build --preset default -t package
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
# Artifact name
name: course-rom-artifacts
# Directory containing files to upload
path: build/default/assets/course-rom-*
- name: Release
if: startsWith(github.ref ,'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: build/default/assets/course-rom-*
draft: false
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc')}}
name: Release ${{ github.ref_name }}
generate_release_notes: true
tag_name: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
deliver:
runs-on: self-ubuntu-22.04
needs: build_code
name: Build docker, tag and push
steps:
- uses: actions/checkout@v3
with:
lfs: true
submodules: 'recursive'
- name: Download
uses: actions/download-artifact@v3
with:
# Artifact name
name: course-rom-artifacts
path: artifacts/
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/feelpp/course-rom
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
-
name: Build container image
uses: docker/build-push-action@v5
with:
context: artifacts
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile