5050 - os : ubuntu-latest
5151 env :
5252 TARGET_TRIPLE : s390x-unknown-linux-gnu
53- # Native Windows build with MSVC
5453 - os : windows-latest
5554 env :
5655 TARGET_TRIPLE : x86_64-pc-windows-msvc
57- # cross-compile from Windows to Windows MinGW
5856 - os : windows-latest
5957 env :
6058 TARGET_TRIPLE : x86_64-pc-windows-gnu
@@ -114,14 +112,6 @@ jobs:
114112 TARGET_TRIPLE : ${{ matrix.env.TARGET_TRIPLE }}
115113 run : ./y.rs test
116114
117- - name : Test abi-cafe
118- env :
119- TARGET_TRIPLE : ${{ matrix.env.TARGET_TRIPLE }}
120- run : |
121- if [[ "$(rustc -vV | grep host | cut -d' ' -f2)" == "$TARGET_TRIPLE" ]]; then
122- ./y.rs abi-cafe
123- fi
124-
125115 - name : Package prebuilt cg_clif
126116 run : tar cvfJ cg_clif.tar.xz dist
127117
@@ -138,3 +128,60 @@ jobs:
138128 with :
139129 name : cg_clif-${{ runner.os }}-cross-x86_64-mingw
140130 path : cg_clif.tar.xz
131+
132+
133+ abi_cafe :
134+ runs-on : ${{ matrix.os }}
135+ timeout-minutes : 60
136+
137+ defaults :
138+ run :
139+ shell : bash
140+
141+ strategy :
142+ fail-fast : true
143+ matrix :
144+ include :
145+ - os : ubuntu-latest
146+ env :
147+ TARGET_TRIPLE : x86_64-unknown-linux-gnu
148+ - os : macos-latest
149+ env :
150+ TARGET_TRIPLE : x86_64-apple-darwin
151+ - os : windows-latest
152+ env :
153+ TARGET_TRIPLE : x86_64-pc-windows-msvc
154+ - os : windows-latest
155+ env :
156+ TARGET_TRIPLE : x86_64-pc-windows-gnu
157+
158+ steps :
159+ - uses : actions/checkout@v3
160+
161+ - name : Cache cargo target dir
162+ uses : actions/cache@v3
163+ with :
164+ path : build/cg_clif
165+ key : ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
166+
167+ - name : Set MinGW as the default toolchain
168+ if : matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
169+ run : rustup set default-host x86_64-pc-windows-gnu
170+
171+ - name : Use sparse cargo registry
172+ run : |
173+ cat >> ~/.cargo/config.toml <<EOF
174+ [unstable]
175+ sparse-registry = true
176+ EOF
177+
178+ - name : Prepare dependencies
179+ run : ./y.rs prepare
180+
181+ - name : Build
182+ run : ./y.rs build --sysroot none
183+
184+ - name : Test abi-cafe
185+ env :
186+ TARGET_TRIPLE : ${{ matrix.env.TARGET_TRIPLE }}
187+ run : ./y.rs abi-cafe
0 commit comments