-
Notifications
You must be signed in to change notification settings - Fork 7
141 lines (128 loc) · 4.99 KB
/
linux.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Linux
on:
pull_request:
branches:
- main
push:
branches:
- main
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
concurrency:
# Skip intermediate builds: all builds except for builds on the `main` branch
# Cancel intermediate builds: only pull request builds
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
linux:
timeout-minutes: 10
needs: build_linux
if: always()
runs-on: ubuntu-latest
steps:
- run: |
echo build_linux: ${{ needs.build_linux.result }}
- run: exit 1
if: needs.build_linux.result != 'success'
build_linux:
timeout-minutes: 120
name: build_linux / ${{ matrix.image }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
# Build a bunch of different "agent" rootfs images.
- 'agent_linux.aarch64'
- 'agent_linux.armv7l'
- 'agent_linux.ppc64le'
- 'agent_linux.x86_64'
- 'agent_linux.i686'
# The `aws_uploader` image is a `debian`-based image that
# contains just `awscli`, for usage in secured pipelines
# that need to upload to AWS.
- 'aws_uploader.x86_64'
# The `debian_minimal` image is a `debian`-based image that
# contains no packages.
- 'debian_minimal.aarch64'
- 'debian_minimal.armv7l'
- 'debian_minimal.ppc64le'
- 'debian_minimal.x86_64'
- 'debian_minimal.i686'
# The `latex` image is used to build the PDF docs
- 'latex.x86_64'
# The `llvm_passes` image contains `gfortran`, so we use it for our
# "from source" (`USE_BINARYBUILDER=0`) jobs.
- 'llvm_passes.aarch64'
- 'llvm_passes.armv7l'
- 'llvm_passes.i686'
- 'llvm_passes.powerpc64le'
- 'llvm_passes.x86_64'
# The `npm_linux` image is a helper for ecosystem jobs that need to build NPM packages
- 'npm_linux.x86_64'
# The `package_linux` images are all `debian`-based.
- 'package_linux.aarch64'
- 'package_linux.armv7l'
- 'package_linux.i686'
- 'package_linux.powerpc64le'
- 'package_linux.x86_64'
# The `package_musl` image is `alpine`-based.
- 'package_musl.x86_64'
# The `pkgserver_logsync` image is a helper for https://github.com/JuliaPackaging/PkgServerLogAnalysis.jl
- 'pkgserver_logsync.x86_64'
# The `rr` image is `debian`-based.
# It is used for building rr from source and running the rr test suite.
- 'rr.aarch64'
- 'rr.x86_64'
# The `tester_linux` images are all `debian`-based.
# They do not include the compiler toolchain.
- 'tester_linux.aarch64'
- 'tester_linux.armv7l'
- 'tester_linux.i686'
- 'tester_linux.powerpc64le'
- 'tester_linux.x86_64'
# The `tester_musl` image is `alpine`-based.
# It does not include the compiler toolchain.
- 'tester_musl.x86_64'
# The `xvfb` image is used in the CI for the PkgEval.jl repo
- 'xvfb.aarch64'
- 'xvfb.x86_64'
# The `yggdrasil` image is used in the CI for the Yggdrasil repo
- 'yggdrasil.x86_64'
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.6'
arch: x64
- run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- run: sudo apt-get update
- run: sudo apt-get -y install binfmt-support debootstrap qemu-user-static
- run: update-binfmts --display
- run: julia --color=yes --project=. -e 'import Pkg; @time Pkg.instantiate()'
- run: julia --color=yes --project=. -e 'import Pkg; @time Pkg.precompile()'
- run: julia --color=yes --project=. -e '@time import RootfsUtils'
- run: |
IMAGE_NAME=$(echo ${{ matrix.image }} | cut -d. -f1)
IMAGE_ARCH=$(echo ${{ matrix.image }} | cut -d. -f2)
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
echo "IMAGE_ARCH=$IMAGE_ARCH" >> $GITHUB_ENV
- run: julia --color=yes --project=. linux/${{ env.IMAGE_NAME }}.jl --arch=${{ env.IMAGE_ARCH }}
id: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo "The tarball name is ${{ steps.build.outputs.tarball_name }}"
- run: echo "The tarball path is ${{ steps.build.outputs.tarball_path }}"
- uses: actions/upload-artifact@v2
if: steps.build.outputs.tarball_name != '' && steps.build.outputs.tarball_path != ''
with:
name: ${{ steps.build.outputs.tarball_name }}
path: ${{ steps.build.outputs.tarball_path }}
if-no-files-found: error