ci: bump actions/cache from 2 to 3 #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: [ '3.0', '3.1', '3.2', '3.3' ] | |
env: | |
LIBTORCH_VERSION: 1.13.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/libtorch | |
key: libtorch-${{ env.LIBTORCH_VERSION }} | |
id: cache-libtorch | |
- name: Download LibTorch | |
if: steps.cache-libtorch.outputs.cache-hit != 'true' | |
run: | | |
cd ~ | |
wget -q -O libtorch.zip https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-$LIBTORCH_VERSION%2Bcpu.zip | |
unzip -q libtorch.zip | |
- name: Set up Ruby ${{ matrix.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: false | |
- name: Build and test with Rake | |
run: | | |
bundle config build.torch-rb --with-torch-dir=$HOME/libtorch | |
bundle install | |
bundle exec rake |