Update figure caption 04_adding_first_tectonic_feature.md #1653
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: benchmarks | |
on: [pull_request] | |
concurrency: | |
group: ${{ github.actor }}-${{ github.ref }}-benchmarks | |
cancel-in-progress: true | |
jobs: | |
benchmarks: | |
strategy: | |
fail-fast: false | |
matrix: | |
benchmark_number: [1,2,3,4,5,6,7,8] | |
include: | |
- benchmark_number: 1 | |
benchmark_name: 'slab_interpolation_simple_none' | |
benchmark_gridfile: 'cartesian_subducting_plate_gridfile' | |
- benchmark_number: 2 | |
benchmark_name: 'slab_interpolation_simple_curved_none' | |
benchmark_gridfile: 'cartesian_subducting_plate_gridfile' | |
- benchmark_number: 3 | |
benchmark_name: 'spherical_slab_interpolation_simple_none' | |
benchmark_gridfile: 'spherical_subducting_plate_gridfile' | |
- benchmark_number: 4 | |
benchmark_name: 'slab_interpolation_simple_curved_CMS' | |
benchmark_gridfile: 'cartesian_subducting_plate_gridfile' | |
- benchmark_number: 5 | |
benchmark_name: 'spherical_slab_interpolation_simple_CMS' | |
benchmark_gridfile: 'spherical_subducting_plate_gridfile' | |
- benchmark_number: 6 | |
benchmark_name: 'spherical_fault_interpolation_simple_none' | |
benchmark_gridfile: 'spherical_subducting_plate_gridfile' | |
- benchmark_number: 7 | |
benchmark_name: 'continental_min_max_surface' | |
benchmark_gridfile: 'cartesian_surface' | |
- benchmark_number: 8 | |
benchmark_name: 'continental_min_max_surface_spherical' | |
benchmark_gridfile: 'spherical_surface_p180' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup cmake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.16.x' | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: cmake version | |
run: cmake --version | |
- name: Checkout cbdr | |
uses: actions/checkout@v2 | |
with: | |
repository: MFraters/cbdr | |
ref: github_actions_fix | |
path: cbdr | |
- name: retrieve cache cbdr | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.cargo/git/ | |
target/ | |
./target/ | |
${{github.workspace}}/cbdr/ | |
${{github.workspace}}/cbdr/target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: retrieve cache main | |
uses: actions/cache@v2 | |
with: | |
path: | | |
${{github.workspace}}/main/ | |
key: ${{ runner.os }}-gwb-main-v3}} | |
- name: retrieve cache feature | |
uses: actions/cache@v2 | |
with: | |
path: | | |
${{github.workspace}}/feature/ | |
key: ${{ runner.os }}-gwb-feature-${{ github.event.number }}-v3}} | |
- name: Checkout cbdr | |
uses: actions/checkout@v2 | |
with: | |
repository: MFraters/cbdr | |
ref: github_actions_fix | |
path: cbdr | |
clean: false | |
- name: Checkout feature | |
uses: actions/checkout@v2 | |
with: | |
path: feature/source | |
clean: false | |
- name: Checkout main | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
path: main/source | |
clean: false | |
- name: cd Build Environment | |
run: | | |
cd ${{github.workspace}}/cbdr/; | |
cargo build --release; | |
- name: Create Build Environment | |
run: | | |
sudo apt install ninja-build; | |
cmake -E make_directory ${{github.workspace}}/main/build; | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{github.workspace}}/main/build | |
run: | | |
pwd; | |
ls; | |
cmake -G"Ninja" $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Werror -DWB_INCLUDE_UNIT_TEST=OFF ${{github.workspace}}/main/source/; | |
- name: Build gwb | |
working-directory: ${{github.workspace}}/main/build | |
shell: bash | |
run: ninja | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{github.workspace}}/feature/build | |
- name: cd Build Environment | |
run: cd ${{github.workspace}}/feature/build; | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{github.workspace}}/feature/build | |
run: | | |
pwd; | |
ls; | |
cmake -G"Ninja" $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Werror -DWB_INCLUDE_UNIT_TEST=OFF ${{github.workspace}}/feature/source/; | |
- name: Build gwb | |
working-directory: ${{github.workspace}}/feature/build | |
shell: bash | |
run: ninja | |
- name: make results dir | |
shell: bash | |
run: | | |
rm -rf ${{github.workspace}}/benchmark_${{matrix.benchmark_number}}_results/; | |
mkdir -p ${{github.workspace}}/benchmark_${{matrix.benchmark_number}}_results/ | |
- name: store pull request number | |
shell: bash | |
if: matrix.benchmark_number == 1 | |
run: | | |
echo "${{matrix.benchmark_number}}"; | |
echo "${{ github.event.number }}" > ${{github.workspace}}/benchmark_${{matrix.benchmark_number}}_results/NR | |
- name: run benchmark | |
shell: bash | |
run: | | |
cd ${{github.workspace}}/cbdr/; | |
time cargo run --release sample --timeout=900s "main:${{github.workspace}}/main/build/bin/./gwb-grid ${{github.workspace}}/feature/source/tests/gwb-dat/${{matrix.benchmark_name}}.wb ${{github.workspace}}/feature/source/tests/gwb-grid/${{matrix.benchmark_gridfile}}.grid" "feature:${{github.workspace}}/feature/build/bin/./gwb-grid ${{github.workspace}}/feature/source/tests/gwb-dat/${{matrix.benchmark_name}}.wb ${{github.workspace}}/feature/source/tests/gwb-grid/${{matrix.benchmark_gridfile}}.grid" > ${{github.workspace}}/result_${{matrix.benchmark_number}}.csv; | |
cat ${{github.workspace}}/result_${{matrix.benchmark_number}}.csv; | |
cat ${{github.workspace}}/result_${{matrix.benchmark_number}}.csv | cargo run --release analyze --disable-dynamic-printing > ${{github.workspace}}/benchmark_${{matrix.benchmark_number}}_results/analyze_${{matrix.benchmark_number}}.log ||:; | |
cat ${{github.workspace}}/benchmark_${{matrix.benchmark_number}}_results/analyze_${{matrix.benchmark_number}}.log | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: benchmark_${{matrix.benchmark_number}}_results | |
path: benchmark_${{matrix.benchmark_number}}_results/ |