-
Notifications
You must be signed in to change notification settings - Fork 27
112 lines (101 loc) · 3.27 KB
/
BuildImages.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Build Images
on:
workflow_dispatch:
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
# cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
build:
name: Build ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
version:
- '1.7'
os:
- ubuntu-latest
# - windows-latest
- macOS-latest
arch:
- x64
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
# if: startsWith(github.ref, 'refs/tags/') || steps.changes.outputs.folder == 'true'
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Instantiate Environments
# if: startsWith(github.ref, 'refs/tags/') || steps.changes.outputs.folder == 'true'
run: |
rm Artifacts.toml
ls
julia --project=. -e 'import Pkg; Pkg.instantiate()'
env:
JULIA_PKG_PRECOMPILE_AUTO: "0"
- name: Build System Image
# if: startsWith(github.ref, 'refs/tags/')
run: |
julia --project=. -e 'using MLCourse; MLCourse.create_sysimage()'
tar -czvf depot.tar.gz --directory precompile --exclude warmup.jl .
env:
PLOTS_HOST_DEPENDENCY_LOCAL: "false"
- uses: actions/upload-artifact@v3
# if: startsWith(github.ref, 'refs/tags/')
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.version }}
path: depot.tar.gz
success:
needs: [build]
name: Successful Build
runs-on: ubuntu-latest
steps:
- name: Success
run: echo "Success"
release:
# if: startsWith(github.ref, 'refs/tags/')
needs: [success]
name: Release ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.version }}
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
version:
- '1.7'
os:
- ubuntu-latest
# - windows-latest
- macOS-latest
arch:
- x64
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.version }}
path: artifacts
- name: Unpack tarball
run: |
mkdir depot
tar -xvf artifacts/depot.tar.gz -C depot
- run: ls depot
- name: Change ownership of any Windows executables or DLLs.
run: |
find depot -type f -iname "*.dll" -exec chmod a+rx {} \;
find depot -type f -iname "*.exe" -exec chmod a+rx {} \;
- name: Repack tarballs
run: |
mkdir -p release
tar -czvf release/${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.version }}.tar.gz -C depot .
- name: Release
uses: ncipollo/release-action@v1
# if: startsWith(github.ref, 'refs/tags/')
with:
artifacts: "release/*.tar.gz"
tag: "sysimages"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
prerelease: true
- uses: geekyeggo/delete-artifact@v1
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.version }}