Start playing with building the libpoplar wrapper in CI #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build libpoplar wrapper | |
on: | |
push: | |
branches: "main" | |
tags: ["*"] | |
pull_request: | |
release: | |
jobs: | |
build-libpoplar: | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.docker_image }} | |
options: --privileged | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- docker_image: graphcore/poplar:3.2.0-ubuntu-20.04-20230314 | |
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 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: "1.7" | |
- uses: julia-actions/cache@v1 | |
- name: Generate source code of libpoplar wrapper | |
working-directory: ${{ github.workspace }}/deps | |
shell: julia --project=. --color=yes {0} | |
run: | | |
using Pkg | |
Pkg.instantiate() | |
run(`pwd`) | |
run(`ls -lhrt .`) | |
@show pwd() | |
@show @__DIR__ | |
include(joinpath(pwd(), "generate_wrapper.jl")) | |
generate_wrappers() | |
env: | |
CXX: g++ |