Skip to content

Commit

Permalink
run Unit tests with Julia 1.6 until 1.9 and nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonEhrig committed Oct 17, 2023
1 parent 84cbe11 commit f6d1307
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
41 changes: 39 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ stages:
- run_integration_test
- verify-unit-test-deps

unit_tests_julia1.9:
image: julia:1.9
.untit_test_template:
stage: unit-test
script:
- apt update && apt install -y git
Expand All @@ -25,6 +24,44 @@ unit_tests_julia1.9:
tags:
- cpuonly

unit_tests_releases:
extends: .untit_test_template
parallel:
matrix:
- JULIA_VERSION: ["1.6", "1.7", "1.8", "1.9"]
image: julia:$JULIA_VERSION

unit_tests_nightly:
extends: .untit_test_template
# use the same baseimage like the official julia images
image: debian:bookworm-slim
variables:
# path where julia tar bal should be downloaded
JULIA_DONWLOAD: /julia/download
# path where julia should be extracted
JULIA_EXTRACT: /julia/extract
before_script:
- apt update && apt install -y wget
- mkdir -p $JULIA_DONWLOAD
- mkdir -p $JULIA_EXTRACT
- >
if [[ $CI_RUNNER_EXECUTABLE_ARCH == "linux/arm64" ]]; then
wget https://julialangnightlies-s3.julialang.org/bin/linux/aarch64/julia-latest-linux-aarch64.tar.gz -O $JULIA_DONWLOAD/julia-nightly.tar.gz
elif [[ $CI_RUNNER_EXECUTABLE_ARCH == "linux/amd64" ]]; then
wget https://julialangnightlies-s3.julialang.org/bin/linux/x86_64/julia-latest-linux-x86_64.tar.gz -O $JULIA_DONWLOAD/julia-nightly.tar.gz
else
echo "unknown runner architecture -> $CI_RUNNER_EXECUTABLE_ARCH"
exit 1
fi
- tar -xf $JULIA_DONWLOAD/julia-nightly.tar.gz -C $JULIA_EXTRACT
# we need to search for the julia base folder name, because the second part of the name is the git commit hash
# e.g. julia-b0c6781676f
- JULIA_EXTRACT_FOLDER=${JULIA_EXTRACT}/$(ls $JULIA_EXTRACT | grep -m1 julia)
# copy everything to /usr to make julia public available
# mv is not possible, because it cannot merge folder
- cp -r $JULIA_EXTRACT_FOLDER/* /usr
allow_failure: true

generate_integration_tests:
image: julia:1.9
stage: generate_integration_test
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
QEDbase = "10e22c08-3ccb-4172-bfcf-7d7aa3d04d93"

[compat]
julia = "1.9"
julia = "1.6"

0 comments on commit f6d1307

Please sign in to comment.