10
10
RUST_BACKTRACE : 1
11
11
# Faster compilation and error on warnings
12
12
RUSTFLAGS : " -C debuginfo=0 -D warnings"
13
+ RUSTDOCFLAGS : " -D warnings"
14
+ CARGO_TERM_VERBOSE : true
13
15
CC : clang
14
16
CXX : clang++
15
17
16
18
jobs :
17
19
test :
18
20
name : Test
19
- # TODO: 32bit and gcc-multilib
21
+ strategy :
22
+ matrix :
23
+ platform :
24
+ - target : x86_64-unknown-linux-gnu
25
+
26
+ - target : i686-unknown-linux-gnu
27
+ cflags : -m32
28
+ configureflags : --target=x86-pc-linux-gnu
29
+
20
30
runs-on : ubuntu-latest
21
31
32
+ env :
33
+ CARGO_BUILD_TARGET : ${{ matrix.platform.target }}
34
+ CFLAGS : ${{ matrix.platform.cflags }}
35
+ CXXFLAGS : ${{ matrix.platform.cflags }}
36
+ ASMFLAGS : ${{ matrix.platform.cflags }}
37
+ LDFLAGS : ${{ matrix.platform.cflags }}
38
+
22
39
steps :
23
40
- uses : actions/checkout@v2
24
41
25
42
- name : Install Clang
26
43
run : sudo apt-get -y install clang
27
44
45
+ - name : Install cross compilation tools
46
+ if : contains(matrix.platform.target, 'i686')
47
+ run : |
48
+ sudo dpkg --add-architecture i386
49
+ sudo apt-get update
50
+ sudo apt-get -y install gcc-multilib libgcc-10-dev:i386 \
51
+ libc6-dev:i386 libstdc++-10-dev:i386 libffi-dev:i386 \
52
+ libxml2-dev:i386 libicu-dev:i386
53
+
28
54
- name : Cache GNUStep
29
55
id : cache-gnustep
30
56
uses : actions/cache@v2
42
68
path : |
43
69
~/gnustep/lib
44
70
~/gnustep/include
45
- key : gnustep-libobjc2_1.9-make_2.9.0-base_1.28.0
71
+ key : ${{ matrix.platform.target }}- gnustep-libobjc2_1.9-make_2.9.0-base_1.28.0
46
72
47
73
- name : Setup environment
48
74
run : |
83
109
wget https://github.com/gnustep/libs-base/archive/refs/tags/base-1_28_0.tar.gz
84
110
tar -xzf base-1_28_0.tar.gz
85
111
cd libs-base-base-1_28_0
86
- ./configure --prefix=$HOME/gnustep --disable-tls --disable-xslt
112
+ ./configure --prefix=$HOME/gnustep --disable-tls --disable-xslt ${{ matrix.platform.configureflags }}
87
113
make install
88
114
ls -al $HOME/gnustep/*
89
115
@@ -93,25 +119,33 @@ jobs:
93
119
path : |
94
120
~/.cargo/
95
121
target/
96
- key : gnustep-cargo-${{ hashFiles('**/Cargo.toml') }}
122
+ key : ${{ matrix.platform.target }}- gnustep-cargo-${{ hashFiles('**/Cargo.toml') }}
97
123
restore-keys : |
98
- gnustep-cargo-
124
+ ${{ matrix.platform.target }}-gnustep-cargo-
125
+
126
+ - name : Install Rust toolchain
127
+ uses : actions-rs/toolchain@v1
128
+ with :
129
+ toolchain : stable
130
+ target : ${{ matrix.platform.target }}
131
+ profile : minimal
132
+ override : true
99
133
100
134
- name : Run checks
101
135
uses : actions-rs/cargo@v1
102
136
with :
103
137
command : check
104
- args : --verbose -- no-default-features --features gnustep-1-9
138
+ args : --no-default-features --features gnustep-1-9
105
139
106
140
- name : Test without features
107
141
uses : actions-rs/cargo@v1
108
142
with :
109
143
command : test
110
- args : --verbose -- no-fail-fast --no-default-features --features gnustep-1-9
144
+ args : --no-fail-fast --no-default-features --features gnustep-1-9
111
145
112
146
- name : Test with features
113
147
uses : actions-rs/cargo@v1
114
148
with :
115
149
command : test
116
150
# Not using --all-features because some features are nightly-only
117
- args : --verbose -- no-fail-fast --features gnustep-1-9,block,exception,catch_all,verify_message
151
+ args : --no-fail-fast --features gnustep-1-9,block,exception,catch_all,verify_message
0 commit comments