Skip to content

[CI] Test with Poplar 3.3 #187

[CI] Test with Poplar 3.3

[CI] Test with Poplar 3.3 #187

Workflow file for this run

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
- julia_version: "^1.11.0-0"
docker_image: graphcore/poplar:3.3.0-ubuntu-20.04-20230703
build_docs: false
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"
if: ${{ matrix.build_docs }}
# 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@v2
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v2
with:
cache-registries: "true"
cache-artifacts: "true"
cache-packages: "true"
cache-compiled: "true"
- name: "Export environment variables"
# Starting from graphcore/poplar:3.3.0 some environment variables like `CPATH` and
# `LD_LIBRARY_PATH`, which we need for building the bindings, are only set with the
# `bash` shell, while GHA uses by default `sh` for steps inside containers. So we
# need to start a step with `shell: bash` and re-export the relevant variables for
# the following steps.
shell: bash
run: |
echo "PATH=${PATH}" >> "${GITHUB_ENV}"
echo "CPATH=${CPATH}" >> "${GITHUB_ENV}"
echo "LIBRARY_PATH=${LIBRARY_PATH}" >> "${GITHUB_ENV}"
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> "${GITHUB_ENV}"
echo "POPLAR_SDK_ENABLED=${POPLAR_SDK_ENABLED}" >> "${GITHUB_ENV}"
- 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