From 11cb307ddd0ee45952a17158621bde1aa59143d6 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Thu, 24 Oct 2024 10:08:13 -0700 Subject: [PATCH] test cache --- .github/actions/install-repo/action.yml | 38 +++++++++++-------------- .github/workflows/cmake.yml | 12 ++++---- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/.github/actions/install-repo/action.yml b/.github/actions/install-repo/action.yml index c307fed..26d3dbd 100644 --- a/.github/actions/install-repo/action.yml +++ b/.github/actions/install-repo/action.yml @@ -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 \ No newline at end of file + - 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 \ No newline at end of file diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 3bf59af..c5ab9ec 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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