23
23
aws-lc-rs-2004-gcc :
24
24
if : github.repository_owner == 'aws'
25
25
name : GCC ${{ matrix.gcc_version }} - CMake ${{ matrix.cmake }} - FIPS ${{ matrix.fips }}
26
- runs-on : ubuntu-20.04
26
+ runs-on : ubuntu-22.04
27
+ container :
28
+ image : ubuntu:20.04
27
29
env :
28
30
AWS_LC_SYS_CMAKE_BUILDER : ${{ matrix.cmake }}
29
31
strategy :
33
35
gcc_version : [ '7', '8' ]
34
36
fips : [ '0', '1' ]
35
37
steps :
36
- - uses : actions/checkout@v4
37
- with :
38
- submodules : ' recursive'
38
+ - run : |
39
+ apt-get update
40
+ apt-get install -y ca-certificates
41
+ apt-get install -y cmake curl sudo
42
+ apt-get install -y --no-install-recommends gpg-agent software-properties-common
43
+ apt-add-repository --yes ppa:git-core/ppa
44
+ add-apt-repository --yes ppa:longsleep/golang-backports
45
+ apt-get update
46
+ apt-get install -y build-essential git golang-go
47
+ curl -L -O -J https://github.com/PowerShell/PowerShell/releases/download/v7.2.23/powershell_7.2.23-1.deb_amd64.deb
48
+ dpkg -i powershell_7.2.23-1.deb_amd64.deb
49
+ apt-get install -f
50
+ rm powershell_7.2.23-1.deb_amd64.deb
51
+ - name : Checkout
52
+ run : |
53
+ mkdir -p /tmp/aws-lc-rs
54
+ git config --global --add safe.directory '*'
55
+ git clone --recursive ${{ github.server_url }}/${{ github.repository }}.git /tmp/aws-lc-rs
56
+ cd /tmp/aws-lc-rs
57
+ git fetch origin ${{ github.sha }}
58
+ git checkout --recurse-submodules -b ci-job ${{ github.sha }}
39
59
- uses : dtolnay/rust-toolchain@master
40
60
id : toolchain
41
61
with :
@@ -45,42 +65,43 @@ jobs:
45
65
with :
46
66
version : ${{ matrix.gcc_version }}
47
67
platform : x64
48
- - if : matrix.fips == '1'
49
- uses : actions/setup-go@v4
50
- with :
51
- go-version : ' >=1.18'
52
68
- name : Run cargo test (debug)
69
+ working-directory : /tmp/aws-lc-rs/
53
70
run : cargo test -p aws-lc-rs --all-targets --no-default-features --features ${{ (matrix.fips == '0' && 'unstable,aws-lc-sys') || 'unstable,fips' }}
54
71
- name : Run cargo test (release)
72
+ working-directory : /tmp/aws-lc-rs/
55
73
run : cargo test -p aws-lc-rs --release --all-targets --no-default-features --features ${{ (matrix.fips == '0' && 'unstable,aws-lc-sys') || 'unstable,fips' }}
56
74
# The steps below verify that we're successfully using `-ffile-prefix-map`
57
75
# to remove build environment paths from the resulting library.
58
76
- if : ${{ matrix.gcc_version == '8' }}
77
+ working-directory : /tmp/aws-lc-rs/
59
78
name : Verify paths found in debug build
60
79
run : |
61
80
DEBUG_LIBCRYPTO=$(find ./target/debug -name "libaws_lc_*_crypto.a")
62
- if strings ${DEBUG_LIBCRYPTO} | grep runner ; then
81
+ if strings ${DEBUG_LIBCRYPTO} | grep '/tmp/aws-lc-rs/' ; then
63
82
exit 0; # SUCCESS
64
83
else
65
- exit 1; # FAIL - we expected to find "runner" (i.e., a path)
84
+ strings ${DEBUG_LIBCRYPTO}
85
+ exit 1; # FAIL - we expected to find "/tmp/aws-lc-rs/" (i.e., a path)
66
86
fi
67
87
# TODO: Due to the nature of the FIPS build (e.g., its dynamic generation of
68
88
# assembly files and its custom compilation commands within CMake), not all
69
89
# source paths are stripped from the resulting binary.
70
90
- if : ${{ matrix.gcc_version == '8' && matrix.fips == '0' }}
91
+ working-directory : /tmp/aws-lc-rs/
71
92
name : Verify paths not found in release build
72
93
run : |
73
94
RELEASE_LIBCRYPTO=$(find ./target/release -name "libaws_lc_*_crypto.a")
74
- if strings ${RELEASE_LIBCRYPTO} | grep runner ; then
75
- exit 1; # FAIL - we did not expect to find "runner " (i.e., a path)
95
+ if strings ${RELEASE_LIBCRYPTO} | grep '/tmp/aws-lc-rs/' ; then
96
+ exit 1; # FAIL - we did not expect to find "/tmp/aws-lc-rs/ " (i.e., a path)
76
97
else
77
98
exit 0; # SUCCESS
78
99
fi
79
100
80
101
aws-lc-rs-1804-gcc :
81
102
if : github.repository_owner == 'aws'
82
103
name : GCC ${{ matrix.gcc_version }} - CMake ${{ matrix.cmake }} - FIPS ${{ matrix.fips }}
83
- runs-on : ubuntu-20 .04
104
+ runs-on : ubuntu-22 .04
84
105
container :
85
106
image : ubuntu:18.04
86
107
env :
0 commit comments