remove python #418
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: Mac-Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: [opened, synchronize, reopened, ready_for_review] | |
schedule: # run build job at 6am UTC every other week on Saturday | |
- cron: '0 6 */14 * 6' | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
BUILD_FLAG: -fprofile-instr-generate -fcoverage-mapping | |
ACCOUNT: chengcli | |
jobs: | |
straka-2d: | |
if: github.event.pull_request.draft == false | |
runs-on: [self-hosted, macOS] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: false | |
- name: set up python libraries | |
run: pip3 install -r requirements.txt | |
- name: check if artifact exists | |
run: echo "ARTIFACT_EXISTS=$(./tools/check_artifact.sh straka_output.nc)" >> $GITHUB_ENV | |
- uses: actions/[email protected] | |
if: env.ARTIFACT_EXISTS == 'true' | |
with: | |
name: straka_output.nc | |
path: ${{github.workspace}}/examples/2019-Li-snap/ | |
- name: fetch the needed lfs file | |
if: env.ARTIFACT_EXISTS == 'false' | |
run: git lfs pull -I examples/2019-Li-snap/straka_output.nc | |
- name: create build directory | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTASK=straka | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j4 | |
- name: run simulation | |
working-directory: ${{github.workspace}}/build/bin | |
run: ./straka.release -i straka.inp | |
- name: combile outputs | |
working-directory: ${{github.workspace}}/build/bin | |
run: ./combine.py -o test | |
- name: compare result | |
run: > | |
${{github.workspace}}/examples/2019-Li-snap/test_straka.py | |
${{github.workspace}}/build/bin/straka-test-main.nc | |
${{github.workspace}}/examples/2019-Li-snap/straka_output.nc | |
- uses: actions/upload-artifact@v3 | |
if: env.ARTIFACT_EXISTS == 'false' | |
with: | |
name: straka_output.nc | |
path: ${{github.workspace}}/examples/2019-Li-snap/straka_output.nc | |
robert-2d: | |
if: github.event.pull_request.draft == false | |
runs-on: [self-hosted, macOS, ARM64] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: false | |
- name: check if artifact exists | |
run: echo "ARTIFACT_EXISTS=$(./tools/check_artifact.sh robert_output.nc)" >> $GITHUB_ENV | |
- uses: actions/[email protected] | |
if: env.ARTIFACT_EXISTS == 'true' | |
with: | |
name: robert_output.nc | |
path: ${{github.workspace}}/examples/2019-Li-snap/ | |
- name: fetch the needed lfs file | |
if: env.ARTIFACT_EXISTS == 'false' | |
run: git lfs pull -I examples/2019-Li-snap/robert_output.nc | |
- name: create build directory | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTASK=robert | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j4 | |
- name: run simulation | |
working-directory: ${{github.workspace}}/build/bin | |
run: mpiexec -n 8 ./robert.release -i robert2d.inp | |
- name: combile outputs | |
working-directory: ${{github.workspace}}/build/bin | |
run: ./combine.py -o test | |
- name: compare result | |
run: > | |
${{github.workspace}}/examples/2019-Li-snap/test_robert.py | |
${{github.workspace}}/build/bin/robert-test-main.nc | |
${{github.workspace}}/examples/2019-Li-snap/robert_output.nc | |
- uses: actions/upload-artifact@v3 | |
if: env.ARTIFACT_EXISTS == 'false' | |
with: | |
name: robert_output.nc | |
path: ${{github.workspace}}/examples/2019-Li-snap/robert_output.nc | |
robert-3d: | |
if: github.event.pull_request.draft == false | |
runs-on: [self-hosted, macOS, ARM64] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: false | |
- name: check if artifact exists | |
run: echo "ARTIFACT_EXISTS=$(./tools/check_artifact.sh robert3d_output.nc)" >> $GITHUB_ENV | |
- uses: actions/[email protected] | |
if: env.ARTIFACT_EXISTS == 'true' | |
with: | |
name: robert3d_output.nc | |
path: ${{github.workspace}}/examples/2019-Li-snap/ | |
- name: fetch the needed lfs file | |
if: env.ARTIFACT_EXISTS == 'false' | |
run: git lfs pull -I examples/2019-Li-snap/robert3d_output.nc | |
- name: create build directory | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTASK=robert | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j4 | |
- name: run simulation | |
working-directory: ${{github.workspace}}/build/bin | |
run: mpiexec -n 8 ./robert.release -i robert3d.inp | |
- name: combile outputs | |
working-directory: ${{github.workspace}}/build/bin | |
run: ./combine.py -o test | |
- name: compare result | |
run: > | |
${{github.workspace}}/examples/2019-Li-snap/test_robert.py | |
${{github.workspace}}/build/bin/robert-test-main.nc | |
${{github.workspace}}/examples/2019-Li-snap/robert3d_output.nc | |
- uses: actions/upload-artifact@v3 | |
if: env.ARTIFACT_EXISTS == 'false' | |
with: | |
name: robert3d_output.nc | |
path: ${{github.workspace}}/examples/2019-Li-snap/robert3d_output.nc | |
bryan-2d: | |
if: github.event.pull_request.draft == false | |
runs-on: [self-hosted, macOS] | |
needs: [straka-2d] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: false | |
- name: check if artifact exists | |
run: echo "ARTIFACT_EXISTS=$(./tools/check_artifact.sh bryan_output.nc)" >> $GITHUB_ENV | |
- uses: actions/[email protected] | |
if: env.ARTIFACT_EXISTS == 'true' | |
with: | |
name: bryan_output.nc | |
path: ${{github.workspace}}/examples/2019-Li-snap/ | |
- name: fetch the needed lfs file | |
if: env.ARTIFACT_EXISTS == 'false' | |
run: git lfs pull -I examples/2019-Li-snap/bryan_output.nc | |
- name: create build directory | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTASK=bryan | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j4 | |
- name: run simulation | |
working-directory: ${{github.workspace}}/build/bin | |
run: mpiexec -n 4 ./bryan.release -i bryan.inp | |
- name: combile outputs | |
working-directory: ${{github.workspace}}/build/bin | |
run: ./combine.py -o test | |
- name: compare result | |
run: > | |
${{github.workspace}}/examples/2019-Li-snap/test_bryan.py | |
${{github.workspace}}/build/bin/bryan-test-main.nc | |
${{github.workspace}}/examples/2019-Li-snap/bryan_output.nc | |
- uses: actions/upload-artifact@v3 | |
if: env.ARTIFACT_EXISTS == 'false' | |
with: | |
name: bryan_output.nc | |
path: ${{github.workspace}}/examples/2019-Li-snap/bryan_output.nc |