Skip to content

Changed compiler flags #3

Changed compiler flags

Changed compiler flags #3

Workflow file for this run

name: GitLab CI
on:
push:
branches:
- main
- feature-add-ci
pull_request:
branches-ignore:
- documentation
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
#
# Deferred GitLab pipelines on Levante at DKRZ (see .gitlab/levante.yml):
#
levante-init:
if: |
github.repository_owner == 'earth-system-radiation' &&
( github.event_name != 'pull_request' ||
( github.event.pull_request.head.repo.owner.login == github.repository_owner &&
github.event.pull_request.user.login != 'dependabot[bot]' ))
runs-on: ubuntu-latest
outputs:
ref-type: ${{ steps.g-push-rev.outputs.ref-type }}
ref-name: ${{ steps.g-push-rev.outputs.ref-name }}
pipeline-id: ${{ steps.gl-trigger-pipeline.outputs.pipeline-id }}
steps:
#
# Check out GitHub repository
#
- name: Check out GitHub repository
uses: actions/checkout@v4
with:
fetch-depth: 0
#
# Push to GitLab repository
#
- name: Push to GitLab repository
id: g-push-rev
uses: "skosukhin/git-ci-hub-lab/g-push-rev@v1"
with:
remote-url: ${{ vars.DKRZ_GITLAB_SERVER }}/${{ vars.DKRZ_GITLAB_PROJECT }}.git
password: ${{ secrets.DKRZ_GITLAB_TOKEN }}
ref-type: tag
ref-message: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
force-push: true
#
# Trigger GitLab CI/CD Pipeline
#
- name: Trigger GitLab CI/CD Pipeline
id: gl-trigger-pipeline
uses: "skosukhin/git-ci-hub-lab/gl-trigger-pipeline@v1"
with:
server-url: ${{ vars.DKRZ_GITLAB_SERVER }}
project-name: ${{ vars.DKRZ_GITLAB_PROJECT }}
token: ${{ secrets.DKRZ_GITLAB_TRIGGER_TOKEN }}
ref-name: ${{ steps.g-push-rev.outputs.ref-name }}
expected-sha: ${{ github.sha }}
levante:
runs-on: ubuntu-latest
needs: levante-init
strategy:
fail-fast: false
matrix:
config-name:
- nvhpc-gpu-cuda-DP
steps:
#
# Build, run and check (fetch the log)
#
- name: Build, run and check (fetch the log)
uses: "skosukhin/git-ci-hub-lab/gl-attach-job@v1"
with:
server-url: ${{ vars.DKRZ_GITLAB_SERVER }}
project-name: ${{ vars.DKRZ_GITLAB_PROJECT }}
token: ${{ secrets.DKRZ_GITLAB_TOKEN }}
pipeline-id: ${{ needs.levante-init.outputs.pipeline-id }}
job-name: ${{ matrix.config-name }}
levante-cleanup:
runs-on: ubuntu-latest
needs: [levante-init, levante]
if: always() && needs.levante-init.result != 'skipped'
continue-on-error: true
steps:
- uses: "skosukhin/git-ci-hub-lab/g-delete-ref@v1"
with:
remote-url: ${{ vars.DKRZ_GITLAB_SERVER }}/${{ vars.DKRZ_GITLAB_PROJECT }}.git
password: ${{ secrets.DKRZ_GITLAB_TOKEN }}
ref-type: ${{ needs.levante-init.outputs.ref-type }}
ref-name: ${{ needs.levante-init.outputs.ref-name }}
force: true