Skip to content

Commit

Permalink
Start playing with building the libpoplar wrapper in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Mar 13, 2024
1 parent ff6ce90 commit feb7d8e
Show file tree
Hide file tree
Showing 5 changed files with 699 additions and 626 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build_libpoplar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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++
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Tests and docs

on:
push:
branches: "main"
tags: ["*"]
pull_request:
release:
# 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
Expand Down
16 changes: 16 additions & 0 deletions deps/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[deps]
Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
libcxxwrap_julia_jll = "3eaa8342-bff7-56a5-9981-c04077f7cee7"

[compat]
Clang = "0.14, 0.17.4"
JSON = "0.21.4"
Pkg = "1"
Scratch = "1.1"
UUIDs = "1"
libcxxwrap_julia_jll = "0.11"
julia = "1.7"
Loading

0 comments on commit feb7d8e

Please sign in to comment.