-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (63 loc) · 2.17 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
name: Tests and docs
on:
push:
branches: "main"
tags: ["*"]
pull_request:
release:
# Note: ideally we'd have one job for running the tests and another for building
# documentation, but running CI of this package is a bit expensive, the easiest
# thing to do is to run everything together in a single job.
jobs:
CI:
runs-on: ubuntu-latest
container: ${{ matrix.docker_image }}
strategy:
fail-fast: false
matrix:
include:
- julia_version: "1.9"
docker_image: graphcore/poplar:2.5.1-ubuntu-20.04-20220629
build_docs: false
- julia_version: "1.10"
docker_image: graphcore/poplar:3.2.0-ubuntu-20.04-20230314
build_docs: true
steps:
- name: "Install, g++, git, jq"
# g++ is needed to build the wrapper, git to publish the docs, jq for
# the `julia-actions/cache` workflow
run: |
apt-get update -y
apt-get install -y g++ git jq
env:
DEBIAN_FRONTEND: noninteractive
- uses: actions/checkout@v4
- name: "Declare git repo safe"
# In the docker container the repo is owned by 1001:123, causing the
# following error when running git commands:
#
# fatal: detected dubious ownership in repository at '/__w/IPUToolkit.jl/IPUToolkit.jl'
# To add an exception for this directory, call:
#
# git config --global --add safe.directory /__w/IPUToolkit.jl/IPUToolkit.jl
run: |
git config --global --add safe.directory "${PWD}"
git status
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
with:
cache-registries: "true"
cache-artifacts: "true"
cache-packages: "true"
cache-compiled: "true"
- uses: julia-actions/julia-buildpkg@v1
env:
CXX: g++
- uses: julia-actions/julia-docdeploy@v1
if: ${{ matrix.build_docs }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- uses: julia-actions/julia-runtest@v1