Skip to content

Commit

Permalink
test cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelyr committed Oct 24, 2024
1 parent 250fef7 commit 11cb307
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
38 changes: 17 additions & 21 deletions .github/actions/install-repo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,23 @@ runs:
with:
key: build-${{inputs.repo-name}}
path: ${{ runner.temp }}/build-${{inputs.repo-name}}

- if: ${{ !steps[format('build-{0}', inputs.repo-name)].outputs.cache-hit }}
shell: bash
run: echo "hello false"

# - name: ${{inputs.repo-name}} Checkout repo
# if: ${{ steps.build-[inputs.repo-name].outputs.cache-hit != 'true' }}
# uses: actions/checkout@v3
# with:
# repository: ${{inputs.repo-path}}
# ref: ${{inputs.repo-ref}}
# path: ${{inputs.repo-name}}
- name: ${{inputs.repo-name}} Checkout repo
if: ${{ !steps[format('build-{0}', inputs.repo-name)].outputs.cache-hit }}
uses: actions/checkout@v3
with:
repository: ${{inputs.repo-path}}
ref: ${{inputs.repo-ref}}
path: ${{inputs.repo-name}}

# - name: ${{inputs.repo-name}} Configure CMake
# shell: bash
# if: ${{ steps.build-[inputs.repo-name].outputs.cache-hit != 'true' }}
# run: cmake -S $GITHUB_WORKSPACE/${{inputs.repo-name}} -B ${{ runner.temp }}/build-${{inputs.repo-name}}
# -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/build-${{inputs.repo-name}}/install
# ${{inputs.options}}
- name: ${{inputs.repo-name}} Configure CMake
shell: bash
if: ${{ !steps[format('build-{0}', inputs.repo-name)].outputs.cache-hit }}
run: cmake -S $GITHUB_WORKSPACE/${{inputs.repo-name}} -B ${{ runner.temp }}/build-${{inputs.repo-name}}
-DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/build-${{inputs.repo-name}}/install
${{inputs.options}}

# - name: ${{inputs.repo-name}} Build
# shell: bash
# if: ${{ steps.build-[inputs.repo-name].outputs.cache-hit != 'true' }}
# run: cmake --build ${{ runner.temp }}/build-${{inputs.repo-name}} -j8 --target install
- name: ${{inputs.repo-name}} Build
shell: bash
if: ${{ !steps[format('build-{0}', inputs.repo-name)].outputs.cache-hit }}
run: cmake --build ${{ runner.temp }}/build-${{inputs.repo-name}} -j8 --target install
12 changes: 6 additions & 6 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:

steps:

# - name: Update packages
# run: sudo apt-get update
- name: Update packages
run: sudo apt-get update

# - name: Install mpi
# run: sudo apt-get install -yq mpich libmpich-dev
- name: Install mpi
run: sudo apt-get install -yq mpich libmpich-dev

# - name: Install Valgrind
# run: sudo apt-get install -yq valgrind
- name: Install Valgrind
run: sudo apt-get install -yq valgrind

- uses: actions/checkout@v4

Expand Down

0 comments on commit 11cb307

Please sign in to comment.