Merge pull request #28 from feelpp/27-add-cff-file #53
Workflow file for this run
This file contains 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
name: CI | |
on: [push] | |
jobs: | |
activate: | |
runs-on: ubuntu-latest | |
if: | | |
github.repository == 'feelpp/feelpp-shapo' && | |
!startsWith(github.event.head_commit.message, 'Release ') && | |
!contains(github.event.head_commit.message, 'ci skip') | |
steps: | |
- run: echo ok go | |
build_docs: | |
needs: activate | |
runs-on: ubuntu-latest | |
name: Build, Install, Package documentation | |
if: "!contains(github.event.head_commit.message, 'docs skip')" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install credentials | |
run: echo https://$GITHUB_OAUTH:@github.com > $HOME/.git-credentials | |
env: | |
GITHUB_OAUTH: ${{ secrets.CR_PAT }} | |
- name: Build | |
run: | | |
npm install | |
npm run antora | |
working-directory: docs | |
- name: Deploy | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages # The branch the action should deploy to. | |
FOLDER: docs/public # The folder the action should deploy. | |
build_code: | |
needs: activate | |
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 build | |
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 | |
uses: actions/upload-artifact@v2 | |
with: | |
# Artifact name | |
name: feelpp-shapo-artifacts | |
# Directory containing files to upload | |
path: build/default/assets/shapo-* | |
check: | |
needs: build_code | |
runs-on: ubuntu-20.04 | |
name: Check Build, Install, Run | |
steps: | |
- name: Download | |
uses: actions/download-artifact@v2 | |
with: | |
# Artifact name | |
name: feelpp-shapo-artifacts | |
# Directory containing files to upload | |
path: build/default/assets/ | |
- name: Display Artifact | |
run: ls -R | |
working-directory: build/default/assets | |
deliver: | |
runs-on: ubuntu-20.04 | |
needs: check | |
name: Docker Build, Tag, Push | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
submodules: 'recursive' | |
- name: Download | |
uses: actions/download-artifact@v2 | |
with: | |
# Artifact name | |
name: feelpp-shapo-artifacts | |
path: artifacts/ | |
- | |
name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
ghcr.io/feelpp/feelpp-shapo | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- | |
name: Set up QEMU | |
uses: docker/[email protected] | |
- | |
name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- | |
name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- | |
name: Build container image | |
uses: docker/build-push-action@v3 | |
with: | |
context: artifacts | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
file: ./Dockerfile | |