Skip to content

Commit

Permalink
Up
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko committed Nov 30, 2023
1 parent 85a1936 commit 7a36af1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ jobs:
${{ runner.os }}-mix-
- uses: actions/cache@v3
with:
path: bumblebee_slow_cache
path: bumblebee_cache_slow
key: bumblebee-cache-slow-${{ hashFiles(format('{0}/bumblebee_cache_slow/**/*.json', github.workspace)) }}
restore-keys: bumblebee-cache-slow-
- run: mix deps.get
- run: mix test --include slow
env:
BUMBLEBEE_CACHE_DIR: ${{ github.workspace }}/bumblebee_slow_cache
BUMBLEBEE_CACHE_DIR: ${{ github.workspace }}/bumblebee_cache_slow
14 changes: 11 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
MIX_ENV: test
XLA_CACHE_DIR: ${{ github.workspace }}/cache/xla
LIBTORCH_DIR: ${{ github.workspace }}/cache/torch
BUMBLEBEE_CACHE_DIR: ${{ github.workspace }}/cache/bumblebee
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
Expand All @@ -39,6 +38,11 @@ jobs:
_build
cache
key: ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }}
- uses: actions/cache@v3
with:
path: bumblebee_cache
key: bumblebee-cache-${{ hashFiles(format('{0}/bumblebee_cache/**/*.json', github.workspace)) }}
restore-keys: bumblebee-cache-
- run: mix deps.get
- run: mix format --check-formatted
if: ${{ matrix.lint }}
Expand All @@ -48,19 +52,23 @@ jobs:
- run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- run: mix test
env:
BUMBLEBEE_CACHE_DIR: ${{ github.workspace }}/bumblebee_cache
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: test/**/*_test.exs
# Cache models for slow tests separately, in case the cache is
# wiped because of size limit
- uses: actions/cache@v3
with:
path: bumblebee_slow_cache
path: bumblebee_cache_slow
key: bumblebee-cache-slow-${{ hashFiles(format('{0}/bumblebee_cache_slow/**/*.json', github.workspace)) }}
restore-keys: bumblebee-cache-slow-
if: ${{ matrix.slow && env.GIT_DIFF_FILTERED != '' }}
- name: Changed slow tests
# mix test exits with a non-zero code if there are no matching tests,
# so we make sure we fail only when the test suite fails
run: mix test test/bumblebee_test.exs --only slow --exit-status 100 ${{ env.GIT_DIFF_FILTERED }} || [ $? -ne 100 ]
if: ${{ matrix.slow && env.GIT_DIFF_FILTERED != '' }}
env:
BUMBLEBEE_CACHE_DIR: ${{ github.workspace }}/bumblebee_slow_cache
BUMBLEBEE_CACHE_DIR: ${{ github.workspace }}/bumblebee_cache_slow

0 comments on commit 7a36af1

Please sign in to comment.