Skip to content

Commit

Permalink
Cache json-fortran
Browse files Browse the repository at this point in the history
  • Loading branch information
timfelle committed Mar 12, 2024
1 parent 20c652a commit 5efbcda
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 34 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/check_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,30 @@ jobs:
- name: Setup submodules
run: git submodule update --init --recursive

# - name: Setup system
# run: |
# sudo apt-get update
# sudo apt-get install -y autotools-dev automake autoconf pkg-config
# sudo apt-get install -y openmpi-bin libopenmpi-dev
# sudo apt-get install -y libopenblas-dev liblapack-dev

- name: Setup system cached
- name: Setup system cache
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: autotools-dev automake autoconf pkg-config openmpi-bin libopenmpi-dev libopenblas-dev liblapack-dev
version: 1.0

- name: Cache json-fortran
id: cache-json-fortran
uses: actions/cache@v3
with:
path: ~/pkg/json-fortran
key: json-fortran-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}
- name: Install json-fortran
if: ${{ (steps.cache-json-fortran.outputs.cache-hit != 'true') }}
run: |
cmake -B external/json-fortran/build -S external/json-fortran -DCMAKE_INSTALL_PREFIX=${HOME}/pkg/json-fortran -DUSE_GNU_INSTALL_CONVENTION=ON ..
cmake --build external/json-fortran/build --parallel $(nproc)
cmake --install external/json-fortran/build --parallel $(nproc)
rm -f ${HOME}/pkg/json-fortran/lib/*.dylib
- name: Setup json-fortran
run: |
export JSON_FORTRAN_DIR=${HOME}/pkg/json-fortran/lib/*.dylib
- name: Build
run: |
./setup.sh --test
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on: [workflow_call]

jobs:
test_documentation:
name: Test the documenation build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr_develop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# cat .github/workflows/deploy.yml
name: Check Development PRs
on:
# Todo: Remove the push events before merging to develop
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/pr_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@


# name: Check Development PRs
# on:
# pull_request:
# branches: [main]
on:
pull_request:
branches: [main]

# jobs:
# # Pull in the external workflows so we avoid duplication
# check_documentation:
# uses: ./.github/workflows/check_documentation.yml
# check_formatting:
# uses: ./.github/workflows/check_formatting.yml
# check_compilation:
# uses: ./.github/workflows/check_compilation.yml
jobs:
# Pull in the external workflows so we avoid duplication
check_documentation:
uses: ./.github/workflows/check_documentation.yml
check_formatting:
uses: ./.github/workflows/check_formatting.yml
check_compilation:
uses: ./.github/workflows/check_compilation.yml

# # Dummy job to trigger the other jobs
# check-develop:
# name: Run all checks for development PRs
# needs:
# - check_documentation
# - check_formatting
# - check_compilation
# runs-on: ubuntu-latest
# steps:
# - name: Success
# run: echo "All checks passed"
# Dummy job to trigger the other jobs
check-develop:
name: Run all checks for development PRs
needs:
- check_documentation
- check_formatting
- check_compilation
runs-on: ubuntu-latest
steps:
- name: Success
run: echo "All checks passed"
2 changes: 1 addition & 1 deletion external/json-fortran

0 comments on commit 5efbcda

Please sign in to comment.