Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: add CI workflow to compile OGS5 on Win/Linux/MacOS #164

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
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
95 changes: 95 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Continuous Integration

on:
push:
branches:
- "master"
tags:
- "*"
pull_request:
branches:
- "master"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build_win:
name: Build on Windows
strategy:
matrix:
os: [windows-2019, windows-2022]
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
submodules: recursive

- name: Setup msbuild.exe
uses: microsoft/[email protected]

- name: Build OGS5-FEM
run: |
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build/ --config Release -j --target package

- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}
path: ./build/ogs-*.zip

build_linux:
name: Build on Linux
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
submodules: recursive

- name: Build OGS5-FEM
env:
CC: gcc-10
CXX: g++-10
run: |
cmake -B build -S . -DOGS_CPU_ARCHITECTURE=generic -DOGS_USE_CVODE=ON -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build/ --config Release -j --target package

- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}
path: ./build/ogs-*.tar.gz

build_macOS:
name: Build on macOS
strategy:
matrix:
os: [macos-10.15, macos-11, macos-12]
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
submodules: recursive

- name: Build OGS5-FEM
env:
CC: gcc-11
CXX: g++-11
run: |
cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14
cmake --build build/ --config Release -j --target package

- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}
path: ./build/ogs-*.tar.gz