-
Notifications
You must be signed in to change notification settings - Fork 103
83 lines (83 loc) · 2.53 KB
/
test.yaml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Test
on:
pull_request:
push:
branches:
- main
env:
OTP_VERSION: "25.0"
ELIXIR_VERSION: "1.14.0"
MIX_ENV: test
XLA_CACHE_DIR: ${{ github.workspace }}/cache/xla
LIBTORCH_DIR: ${{ github.workspace }}/cache/torch
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Erlang & Elixir
uses: erlef/setup-beam@v1
with:
otp-version: "${{ env.OTP_VERSION }}"
elixir-version: "${{ env.ELIXIR_VERSION }}"
- uses: actions/cache@v3
with:
path: |
deps
_build
cache
key: ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install mix dependencies
run: mix deps.get
- name: Check formatting
run: mix format --check-formatted
- name: Compile without optional deps
run: mix compile --skip-optional-deps --warnings-as-errors
- name: Run tests
run: mix test
exla_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Erlang & Elixir
uses: erlef/setup-beam@v1
with:
otp-version: "${{ env.OTP_VERSION }}"
elixir-version: "${{ env.ELIXIR_VERSION }}"
- uses: actions/cache@v3
with:
path: |
deps
_build
cache
key: ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install mix dependencies
run: mix deps.get
- name: Run tests against EXLA
run: USE_EXLA=true mix do compile --warnings-as-errors, test
torchx_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Erlang & Elixir
uses: erlef/setup-elixir@v1
with:
otp-version: "${{ env.OTP_VERSION }}"
elixir-version: "${{ env.ELIXIR_VERSION }}"
- uses: actions/cache@v3
with:
path: |
deps
_build
cache
key: ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install mix dependencies
run: mix deps.get
- name: Run tests against Torchx
run: USE_TORCHX=true mix do compile --warnings-as-errors, test