@@ -149,8 +149,50 @@ jobs:
149149 /usr/bin/find ~/.cargo/bin ! -type d -exec strip {} \;
150150 cargo cache --autoclean
151151 shell : bash
152- integration :
152+ integration_build :
153153 needs : changelog
154+ runs-on : ubuntu-latest
155+
156+ steps :
157+ - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
158+ with :
159+ github_token : " ${{ secrets.github_token }}"
160+ - name : rust-toolchain
161+ uses : actions-rs/toolchain@v1.0.3
162+ with :
163+ toolchain : nightly
164+ target : x86_64-unknown-linux-gnu
165+ profile : minimal
166+ - name : Cache cargo dir
167+ uses : actions/cache@v1
168+ with :
169+ path : ~/.cargo
170+ key : ${{ runner.os }}-x86_64-unknown-linux-gnu
171+ - name : Checkout
172+ uses : actions/checkout@v2.0.0
173+ - name : Master Toolchain Setup
174+ run : bash setup-toolchain.sh
175+
176+ - name : Build Integration Test
177+ run : cargo test --test integration --features integration --no-run
178+ - name : Extract Binaries
179+ run : |
180+ DIR=$CARGO_TARGET_DIR/debug
181+ find $DIR ! -executable -o -type d ! -path $DIR | xargs rm -rf
182+ mv $DIR/integration-* $DIR/integration
183+ - name : Upload Binaries
184+ uses : actions/upload-artifact@v1
185+ with :
186+ name : target
187+ path : target
188+
189+ - name : Run cargo-cache --autoclean
190+ run : |
191+ cargo install cargo-cache --debug
192+ find ~/.cargo/bin ! -type d -exec strip {} \;
193+ cargo cache --autoclean
194+ integration :
195+ needs : integration_build
154196 strategy :
155197 fail-fast : false
156198 max-parallel : 6
@@ -194,12 +236,18 @@ jobs:
194236 - name : Master Toolchain Setup
195237 run : bash setup-toolchain.sh
196238
197- - name : Build
198- run : cargo build --features integration
239+ - name : Download target dir
240+ uses : actions/download-artifact@v1
241+ with :
242+ name : target
243+ path : target
244+ - name : Make Binaries Executable
245+ run : chmod +x $CARGO_TARGET_DIR/debug/*
199246 - name : Test ${{ matrix.integration }}
200- run : cargo test --test integration --features integration
247+ run : $CARGO_TARGET_DIR/debug/ integration
201248 env :
202249 INTEGRATION : ${{ matrix.integration }}
250+ RUSTUP_TOOLCHAIN : master
203251
204252 - name : Run cargo-cache --autoclean
205253 run : |
0 commit comments