Simplify github actions conf
This commit is contained in:
parent
5e6a3be56c
commit
ed37ed7cb8
52
.github/workflows/ci.yml
vendored
52
.github/workflows/ci.yml
vendored
@ -11,7 +11,10 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
libgccjit_version: ["libgccjit.so", "libgccjit_without_int128.so", "libgccjit12.so"]
|
||||
libgccjit_version:
|
||||
- { gcc: "libgccjit.so", extra: "" }
|
||||
- { gcc: "libgccjit_without_int128.so", extra: "" }
|
||||
- { gcc: "libgccjit12.so", extra: "--no-default-features" }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -28,7 +31,7 @@ jobs:
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
workflow: main.yml
|
||||
name: ${{ matrix.libgccjit_version }}
|
||||
name: ${{ matrix.libgccjit_version.gcc }}
|
||||
path: gcc-build
|
||||
repo: antoyo/gcc
|
||||
search_artifacts: true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
|
||||
@ -78,19 +81,10 @@ jobs:
|
||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
|
||||
|
||||
- name: Build
|
||||
if: matrix.libgccjit_version != 'libgccjit12.so'
|
||||
run: |
|
||||
./prepare_build.sh
|
||||
./build.sh
|
||||
cargo test
|
||||
./clean_all.sh
|
||||
|
||||
- name: Build
|
||||
if: matrix.libgccjit_version == 'libgccjit12.so'
|
||||
run: |
|
||||
./prepare_build.sh
|
||||
./build.sh --no-default-features
|
||||
cargo test --no-default-features
|
||||
./build.sh ${{ matrix.libgccjit_version.extra }}
|
||||
cargo test ${{ matrix.libgccjit_version.extra }}
|
||||
./clean_all.sh
|
||||
|
||||
- name: Prepare dependencies
|
||||
@ -106,8 +100,7 @@ jobs:
|
||||
command: build
|
||||
args: --release
|
||||
|
||||
- name: Test
|
||||
if: matrix.libgccjit_version != 'libgccjit12.so'
|
||||
- name: Test std_tests
|
||||
run: |
|
||||
# Enable backtraces for easier debugging
|
||||
export RUST_BACKTRACE=1
|
||||
@ -116,10 +109,9 @@ jobs:
|
||||
export COMPILE_RUNS=2
|
||||
export RUN_RUNS=2
|
||||
|
||||
./test.sh --release
|
||||
./test.sh --release --clean --build-sysroot --std-tests ${{ matrix.libgccjit_version.extra }}
|
||||
|
||||
- name: Test
|
||||
if: matrix.libgccjit_version == 'libgccjit12.so'
|
||||
- name: Test test_libcore
|
||||
run: |
|
||||
# Enable backtraces for easier debugging
|
||||
export RUST_BACKTRACE=1
|
||||
@ -128,7 +120,29 @@ jobs:
|
||||
export COMPILE_RUNS=2
|
||||
export RUN_RUNS=2
|
||||
|
||||
./test.sh --release --no-default-features
|
||||
./test.sh --release --test-libcore ${{ matrix.libgccjit_version.extra }}
|
||||
|
||||
- name: Test extended_sysroot_tests
|
||||
run: |
|
||||
# Enable backtraces for easier debugging
|
||||
export RUST_BACKTRACE=1
|
||||
|
||||
# Reduce amount of benchmark runs as they are slow
|
||||
export COMPILE_RUNS=2
|
||||
export RUN_RUNS=2
|
||||
|
||||
./test.sh --release --extended-tests ${{ matrix.libgccjit_version.extra }}
|
||||
|
||||
- name: Test test_rustc
|
||||
run: |
|
||||
# Enable backtraces for easier debugging
|
||||
export RUST_BACKTRACE=1
|
||||
|
||||
# Reduce amount of benchmark runs as they are slow
|
||||
export COMPILE_RUNS=2
|
||||
export RUN_RUNS=2
|
||||
|
||||
./test.sh --release --test-rustc ${{ matrix.libgccjit_version.extra }}
|
||||
|
||||
duplicates:
|
||||
runs-on: ubuntu-latest
|
||||
|
29
test.sh
29
test.sh
@ -17,7 +17,7 @@ export LIBRARY_PATH="$GCC_PATH"
|
||||
flags=
|
||||
gcc_master_branch=1
|
||||
channel="debug"
|
||||
func=all
|
||||
funcs=()
|
||||
build_only=0
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
@ -42,32 +42,36 @@ while [[ $# -gt 0 ]]; do
|
||||
shift
|
||||
;;
|
||||
"--test-rustc")
|
||||
func=test_rustc
|
||||
funcs+=(test_rustc)
|
||||
shift
|
||||
;;
|
||||
|
||||
"--test-libcore")
|
||||
func=test_libcore
|
||||
funcs+=(test_libcore)
|
||||
shift
|
||||
;;
|
||||
|
||||
"--clean-ui-tests")
|
||||
func=clean_ui_tests
|
||||
funcs+=(clean_ui_tests)
|
||||
shift
|
||||
;;
|
||||
"--clean")
|
||||
funcs+=(clean)
|
||||
shift
|
||||
;;
|
||||
|
||||
"--std-tests")
|
||||
func=std_tests
|
||||
funcs+=(std_tests)
|
||||
shift
|
||||
;;
|
||||
|
||||
"--extended-tests")
|
||||
func=extended_sysroot_tests
|
||||
funcs+=(extended_sysroot_tests)
|
||||
shift
|
||||
;;
|
||||
|
||||
"--build-sysroot")
|
||||
func=build_sysroot
|
||||
funcs+=(build_sysroot)
|
||||
shift
|
||||
;;
|
||||
"--build")
|
||||
@ -84,7 +88,6 @@ done
|
||||
if [[ $channel == "release" ]]; then
|
||||
export CHANNEL='release'
|
||||
CARGO_INCREMENTAL=1 cargo rustc --release $flags
|
||||
shift
|
||||
else
|
||||
echo $LD_LIBRARY_PATH
|
||||
export CHANNEL='debug'
|
||||
@ -92,6 +95,7 @@ else
|
||||
fi
|
||||
|
||||
if (( $build_only == 1 )); then
|
||||
echo "Since it's `build-only`, exiting..."
|
||||
exit
|
||||
fi
|
||||
|
||||
@ -285,4 +289,11 @@ function all() {
|
||||
test_rustc
|
||||
}
|
||||
|
||||
$func
|
||||
if [ ${#funcs[@]} -eq 0 ]; then
|
||||
echo "No command passed, running `--all`..."
|
||||
all
|
||||
else
|
||||
for t in ${funcs[@]}; do
|
||||
$t
|
||||
done
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user