forked from bentoml/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
54 lines (51 loc) · 1.69 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Setup repo
description: Setup repo with all features on CI
inputs:
python-version:
description: "Python version"
required: true
default: "3.10"
architecture:
description: "Which architecture to run on"
required: true
default: x64
runs:
using: composite
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
architecture: ${{ inputs.architecture }}
- name: Setup bazel
shell: bash
# NOTE: we have a wrapper that setup bazel locally, so we will run this
# to download the binary to the GitHub runner.
run: bazel --version
- uses: cachix/install-nix-action@v18
name: Setup Nix
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Get pip cache dir
id: pip-cache
shell: bash
run: echo "directory=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Get cache key prefix
id: get-cache-key-prefix
shell: bash
run: |
echo "prefix=$ImageOS-$ImageVersion" >> $GITHUB_OUTPUT
- name: Cache PyPI
id: cache-pypi
uses: actions/cache@v3.0.10
with:
key: ${{ steps.get-cache-key-prefix.outputs.prefix }}-pypi-${{ hashFiles('requirements/*-requirements.txt') }}
path: ${{ steps.pip-cache.outputs.directory }}
restore-keys: |
${{ steps.get-cache-key-prefix.outputs.prefix }}-pypi--
- name: Install development dependencies
shell: bash
run: python -m pip install -r requirements/dev-requirements.lock.txt
- name: Install development dependencies
shell: bash
run: python -m pip install git+https://github.com/bentoml/bentoml.git@main