Skip to content

Commit

Permalink
Reset
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv committed Oct 31, 2023
1 parent 8e2fa2c commit c6fc7a2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
27 changes: 19 additions & 8 deletions .github/actions/workspace/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,37 @@ inputs:
options:
- save
- restore
- delete
path:
required: true
name:
key:
required: true
default: ${{ github.workflow }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ github.sha }}
# default: ${{ github.workflow }}-${{ runner.os }}-${{ github.sha }}
default: ${{ runner.os }}-${{ github.sha }}
token:
required: false
default: ${{ github.token }}

runs:
using: "composite"
steps:
- name: Create workspace
if: ${{ inputs.action == 'save' }}
uses: actions/upload-artifact@v3
uses: actions/cache/save@v3
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
retention-days: 1
if-no-files-found: error
key: ${{ inputs.key }}
- name: Restore workspace
if: ${{ inputs.action == 'restore' }}
uses: actions/download-artifact@v3
uses: actions/cache/restore@v3
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
key: ${{ inputs.key }}
fail-on-cache-miss: true
- name: Delete workspace
if: ${{ inputs.action == 'delete' }}
shell: bash
env:
GH_TOKEN: ${{ inputs.token }}
run: |
gh cache delete ${{ inputs.key }}
25 changes: 18 additions & 7 deletions .github/workflows/unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ jobs:
uses: ./.github/actions/workspace
with:
action: save
path: |
build/
!build/**/CMakeFiles
path: build/

libmamba_tests_unix:
name: libmamba tests
Expand All @@ -72,7 +70,7 @@ jobs:
with:
environment-file: ./dev/environment-dev.yml
environment-name: build_env
- name: Download builds
- name: Restore workspace
uses: ./.github/actions/workspace
with:
action: restore
Expand All @@ -81,9 +79,22 @@ jobs:
shell: bash -l {0}
run: |
unset CONDARC # Interferes with tests
cd build/libmamba/tests/
chmod +x test_libmamba
./test_libmamba
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
Expand Down

0 comments on commit c6fc7a2

Please sign in to comment.