-
Notifications
You must be signed in to change notification settings - Fork 52
92 lines (73 loc) · 2.73 KB
/
toolchains.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
86
87
88
89
90
91
92
name: Toolchains
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
OCI_EXE: docker
jobs:
build-itk-wasm-base:
name: "Build itk-wasm-base"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.1
- run: pixi run export-itk-wasm-env-vars
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
- name: Pull latest Docker images
run: |
./src/docker/pull.sh --no-debug
- uses: actions/download-artifact@v4
continue-on-error: true
with:
name: docker-cache
path: ./docker-cache
- name: Build itk-wasm-base
run: |
if [[ -e ./docker-cache/itk-wasm-emscripten-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-emscripten-base.tar.xz | docker load ; fi
./src/docker/itk-wasm-base/build.sh
mkdir -p ./docker-cache
docker export itkwasm/emscripten-base:latest | xz -e9 -T0 > ./docker-cache/itk-wasm-emscripten-base.tar.xz
- name: Build itk-wasm-base
run: |
if [[ -e ./docker-cache/itk-wasm-wasi-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-wasi-base.tar.xz | docker load ; fi
./src/docker/itk-wasm-base/build.sh --with-wasi
mkdir -p ./docker-cache
docker export itkwasm/wasi-base:latest | xz -e9 -T0 > ./docker-cache/itk-wasm-wasi-base.tar.xz
- name: Cache docker results
uses: actions/upload-artifact@v4
with:
name: docker-cache
path: ./docker-cache
retention-days: 7
build-itk-wasm:
name: "Build itk-wasm"
needs: build-itk-wasm-base
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.1
- run: pixi run export-itk-wasm-env-vars
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
- name: Pull latest Docker images
run: |
./src/docker/pull.sh --no-debug
- uses: actions/download-artifact@v4
continue-on-error: true
with:
name: docker-cache
path: ./docker-cache
- name: Build itk-wasm
run: |
sudo mkdir -p /var/lib/docker/tmp
if [[ -e ./docker-cache/itk-wasm-emscripten-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-emscripten-base.tar.xz | docker import - itkwasm/emscripten:latest ; fi
./src/docker/itk-wasm/build.sh
- name: Build itk-wasi
run: |
if [[ -e ./docker-cache/itk-wasm-wasi-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-wasi-base.tar.xz | docker import - itkwasm/wasi:latest ; fi
./src/docker/itk-wasm/build.sh --with-wasi