Skip to content

Commit

Permalink
No cache deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv committed Oct 31, 2023
1 parent c6fc7a2 commit 2ea3572
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
3 changes: 1 addition & 2 deletions .github/actions/workspace/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ inputs:
required: true
key:
required: true
# default: ${{ github.workflow }}-${{ runner.os }}-${{ github.sha }}
default: ${{ runner.os }}-${{ github.sha }}
default: ${{ github.workflow }}-${{ $github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ github.sha }}
token:
required: false
default: ${{ github.token }}
Expand Down
35 changes: 14 additions & 21 deletions .github/workflows/unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash -l {0}

jobs:
build_shared_unix:
name: Build binaries
Expand Down Expand Up @@ -48,11 +52,15 @@ jobs:
cmake --build build/ --parallel --target test_libmamba testing_libmamba_lock
- name: Show build cache statistics
run: sccache --show-stats
- name: Lock environment
run: micromamba env export --explicit > build/environment.lock
- name: Save workspace
uses: ./.github/actions/workspace
with:
action: save
path: build/
path: |
build/
!build/**/CMakeFiles
libmamba_tests_unix:
name: libmamba tests
Expand All @@ -65,37 +73,22 @@ jobs:
steps:
- name: Checkout mamba repository
uses: actions/checkout@v3
- name: Create build environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ./dev/environment-dev.yml
environment-name: build_env
- name: Restore workspace
uses: ./.github/actions/workspace
with:
action: restore
path: build/
- name: Create build environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ./build/environment.lock
environment-name: build_env
- name: Run libmamba tests
shell: bash -l {0}
run: |
unset CONDARC # Interferes with tests
cd build/libmamba/tests/ && ./test_libmamba
delete_workspace:
name: Delete workspace caches
needs: ["libmamba_tests_unix"]
runs-on: ubuntu-latest
if: always()
steps:
- name: Checkout mamba repository
uses: actions/checkout@v3
- name: Delete workspace
uses: ./.github/actions/workspace
with:
action: delete
path: build/
token: "notatoken"

umamba_integration_tests_unix:
name: Micromamba integration tests
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit 2ea3572

Please sign in to comment.