-
Notifications
You must be signed in to change notification settings - Fork 8
85 lines (72 loc) · 2.22 KB
/
ci.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
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
84
85
name: CI
on: [push, pull_request]
env:
cache-revision: r20210426a
jobs:
test:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- if: matrix.os == 'ubuntu-latest'
name: Set up PATH on Linux
run: echo "/tmp/texlive/bin/x86_64-linux" >> $GITHUB_PATH
- if: matrix.os == 'macos-latest'
name: Set up PATH on macOS
run: echo "/tmp/texlive/bin/universal-darwin" >> $GITHUB_PATH
- if: matrix.os == 'windows-latest'
name: Set up PATH on Windows
run: echo "D:\texlive\bin\windows" >> $GITHUB_PATH
shell: bash
- if: matrix.os != 'windows-latest'
name: Cache TeX Live on Unix
uses: actions/cache@v3
id: cache-texlive-unix
with:
path: /tmp/texlive
key: ${{ runner.os }}-texlive-${{ env.cache-revision }}
restore-keys: |
${{ runner.os }}-texlive-
- if: matrix.os == 'windows-latest'
name: Cache TeX Live on Windows
uses: actions/cache@v3
id: cache-texlive-windows
with:
path: D:\texlive
key: ${{ runner.os }}-texlive-${{ env.cache-revision }}
restore-keys: |
${{ runner.os }}-texlive-
- name: Cache RubyGems
uses: actions/cache@v3
id: cache-gems
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Set up RubyGems
run: |
gem update --system --no-document --conservative
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- if: |
matrix.os != 'windows-latest' &&
steps.cache-texlive-unix.outputs.cache-hit != 'true'
name: Set up TeX Live on Unix
run: bundle exec rake setup_unix
- if: |
matrix.os == 'windows-latest' &&
steps.cache-texlive-windows.outputs.cache-hit != 'true'
name: Set up TeX Live on Windows
run: bundle exec rake setup_windows
- name: Run tests
run: bundle exec rake test