@@ -2,5 +2,54 @@ name: 'Set up a CentOS 6 container to build releases in'
2
2
description : ' Set up a CentOS 6 container to build releases in'
3
3
4
4
runs :
5
- using : node12
6
- main : ' main.js'
5
+ using : " composite"
6
+ steps :
7
+ # On OSX all we need to do is configure our deployment target as old as
8
+ # possible. For now 10.9 is the limit.
9
+ - if : runner.os == 'macOS'
10
+ shell : bash
11
+ run : |
12
+ cat >> $GITHUB_ENV <<EOF
13
+ MACOSX_DEPLOYMENT_TARGET=10.9
14
+ python=python3
15
+ EOF
16
+
17
+ # On Windows we build against the static CRT to reduce dll dependencies
18
+ - if : runner.os == 'Windows'
19
+ shell : bash
20
+ run : |
21
+ cat >> $GITHUB_ENV <<EOF
22
+ RUSTFLAGS=-Ctarget-feature=+crt-static
23
+ python=python
24
+ EOF
25
+
26
+ # ... and on Linux we do fancy things with containers. We'll spawn an old
27
+ # CentOS container in the background with a super old glibc, and then we'll run
28
+ # commands in there with the `$CENTOS` env var.
29
+ - name : Set up Docker Buildx
30
+ if : runner.os == 'Linux'
31
+ uses : docker/setup-buildx-action@v2
32
+
33
+ - name : Build old Linux container
34
+ if : runner.os == 'Linux'
35
+ uses : docker/build-push-action@v3
36
+ with :
37
+ context : ${{ github.action_path }}/docker
38
+ load : true
39
+ tags : binary-compatible-builds
40
+ cache-from : type=gha
41
+ cache-to : type=gha,mode=max
42
+
43
+ - if : runner.os == 'Linux'
44
+ shell : bash
45
+ run : |
46
+ # FIXME(rust-lang/rust#80703) LD_LIBRARY_PATH shouldn't be necessary
47
+ docker run -di --name centos -v $PWD:$PWD -v $(rustc --print sysroot):/rust:ro \
48
+ --env LD_LIBRARY_PATH=/rust/lib \
49
+ --env PATH="/opt/rh/devtoolset-8/root/usr/bin:$PATH:/rust/bin" \
50
+ binary-compatible-builds
51
+
52
+ cat >> $GITHUB_ENV <<EOF
53
+ CENTOS=$GITHUB_ACTION_PATH/run-linux
54
+ python=python3
55
+ EOF
0 commit comments