Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,58 @@ jobs:
set -e
$(JULIA) -e 'using Pkg; Pkg.Registry.update(); Pkg.instantiate()'
$(JULIA) -e 'using BinaryBuilder; BinaryBuilder.versioninfo()'
$(JULIA) -e 'using Pkg; Pkg.status(; mode=PKGMODE_MANIFEST)'
$(JULIA) -e 'using Pkg; Pkg.status(; mode=Pkg.PKGMODE_MANIFEST)'
df -h ${TMPDIR:-/tmp} .
name: SystemInfo

- job: Test
dependsOn: Info
timeoutInMinutes: 120
strategy:
# The agents share a single machine (and disk); running the legs in
# parallel stacks their peak disk usage (compiler shards, build prefixes)
# and has taken the whole machine down with ENOSPC before.
maxParallel: 1
matrix:
Privileged_SquashFS:
BINARYBUILDER_RUNNER: privileged
BINARYBUILDER_USE_SQUASHFS: true
# Run the full shard test on the squashfs leg: squashfs shards stay
# compressed on disk, so downloading shards for every platform is an
# order of magnitude cheaper than with unpacked shards.
BINARYBUILDER_FULL_SHARD_TEST: true
Unprivileged_Unpacked:
BINARYBUILDER_RUNNER: unprivileged
BINARYBUILDER_USE_SQUASHFS: false
BINARYBUILDER_FULL_SHARD_TEST: true
Docker_Unpacked:
BINARYBUILDER_RUNNER: docker
BINARYBUILDER_USE_SQUASHFS: false

steps:
- bash: |
# Clean up leftovers of previous runs that died before reaching their
# Cleanup step (e.g. when the agent itself was killed by ENOSPC).
for dir in $(find ${TMPDIR} -name .mounts 2>/dev/null); do
sudo umount ${dir}/* || true
done
rm -rf ${TMPDIR}/jl_* || true
# Collect unused artifacts (mainly compiler shards of previous runs)
# immediately, instead of after Pkg's default 7-day grace period.
$(JULIA) -e 'using Pkg, Dates; Pkg.gc(; collect_delay=Hour(0))'
df -h ${TMPDIR:-/tmp} .
name: PreCleanup

- bash: |
set -e
$(JULIA) -e 'using Pkg; Pkg.gc()'
$(JULIA) --check-bounds=yes --inline=yes -e 'using Pkg; Pkg.Registry.update(); Pkg.instantiate(); Pkg.test(coverage=true)'
$(JULIA) -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())' || true
$(JULIA) -e 'using Pkg; Pkg.activate(; temp=true); Pkg.add("Coverage"); using Coverage; cd(ARGS[1]) do; Codecov.submit(process_folder()); end' $(Build.SourcesDirectory) || true
name: Test

- bash: |
for dir in $(find ${TMPDIR} -name .mounts); do
for dir in $(find ${TMPDIR} -name .mounts 2>/dev/null); do
sudo umount ${dir}/* || true
done
rm -rf ${TMPDIR}/jl_* || true
df -h ${TMPDIR:-/tmp} .
name: Cleanup
condition: always()
2 changes: 1 addition & 1 deletion test/auditing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ end
# audit should warn us.
libgfortran_versions = (3, 4, 5)
other_libgfortran_version = libgfortran_versions[findfirst(v -> v != our_libgfortran_version.major, libgfortran_versions)]
@test_logs (:warn, Regex("but we are supposedly building for libgfortran$(other_libgfortran_version)")) (:warn, r"Linked library libgfortran\.so\.(4|5)") (:warn, r"Linked library libquadmath\.so\.0") (:warn, r"Linked library libgcc_s\.so\.1") readmeta(hello_world_path) do ohs
@test_logs (:warn, Regex("but we are supposedly building for libgfortran$(other_libgfortran_version)")) (:warn, r"Linked library libgfortran\.so\.(4|5)") (:warn, r"Linked library libquadmath\.so\.0") (:warn, r"Linked library libgcc_s\.so\.1") match_mode=:any readmeta(hello_world_path) do ohs
foreach(ohs) do oh
p = deepcopy(platform)
p["libgfortran_version"] = "$(other_libgfortran_version).0.0"
Expand Down
42 changes: 27 additions & 15 deletions test/building.jl
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,18 @@ shards_to_test = expand_cxxstring_abis(expand_gfortran_versions(shards_to_test))
FLAGS=(CFLDFLAGS="-lgfortran -lm")
fi

# Keep Cargo's build dir out of the read-only testsuite source tree.
export CARGO_TARGET_DIR="${WORKSPACE}/cargo-target"
mkdir -p "${CARGO_TARGET_DIR}"

# Newer Cargo requires package.version for `cargo install`.
for cargo_toml in /usr/share/testsuite/rust/*/Cargo.toml; do
[[ -f "${cargo_toml}" ]] || continue
if ! grep -q '^version[[:space:]]*=' "${cargo_toml}"; then
sed -i '/^\[package\]/a version = "1.0.0"' "${cargo_toml}"
fi
done

# Build testsuite
make -j${nproc} -sC /usr/share/testsuite install "${FLAGS[@]}"
# Install fake license just to silence the warning
Expand Down Expand Up @@ -257,27 +269,27 @@ end
]
expected_git_shas = Dict(
v"4" => Dict(
x86_64_linux => Base.SHA1("cc2ad05285813f6b70bac6241a8fc869c5d331ee"),
ppc64le_linux => Base.SHA1("d53d766c5a098420dbdc8fa7b79e343860096ac4"),
armv7l_linux => Base.SHA1("673b4a548ef7dbc07a9230e094b199c48018bc6e"),
aarch64_linux => Base.SHA1("8938e2f1f3c25ebfa4fb1f5fceb2dacc241c95c4"),
x86_64_macos => Base.SHA1("b0f9ef3b42b30f9085d4f9d60c3ea441554c442f"),
x86_64_linux => Base.SHA1("8478dcd50e8e87ded1593926b3e8838d914379d1"),
ppc64le_linux => Base.SHA1("e43be740df0a56728ef797ecd9f3bec7ea1c1ff2"),
armv7l_linux => Base.SHA1("2708827f55563d6a8c2e29057abe8624e6d98a36"),
aarch64_linux => Base.SHA1("27118d1007a6778a21a24573eabc8e8501b933dd"),
x86_64_macos => Base.SHA1("a2a55420d0f1f5905370198aa51db53abb1c6743"),
i686_windows => Base.SHA1("f39858ccc34a63a648cf21d33ae236bfdd706d09"),
),
v"5" => Dict(
x86_64_linux => Base.SHA1("a92857b327fcaddfe0e31081ac8cd96e3e0ec2ea"),
ppc64le_linux => Base.SHA1("e47c4e8ba3cd44a13b2e0eeb49f28fe0f958e25b"),
armv7l_linux => Base.SHA1("6e5a108b68b2f12dae88a21b756e15c61eaefd6b"),
aarch64_linux => Base.SHA1("b1afb1cbfa5a919528c869cedf96a8fe70687a27"),
x86_64_macos => Base.SHA1("9ddfd323ed25fc02394067c6e863f1cf826a9e5e"),
x86_64_linux => Base.SHA1("2cf77e334ecfb404ea619b59b071cb070f942f0e"),
ppc64le_linux => Base.SHA1("9346b5cff819efe3f12eaaef5fdde0d3bdc0eedc"),
armv7l_linux => Base.SHA1("2f7f39106e1b38650e56b42f496727a3b1d46559"),
aarch64_linux => Base.SHA1("f615819e5490ef0eaede1385b183e665b652d3c1"),
x86_64_macos => Base.SHA1("43fef13003977a47f29cd2bf6e49f0584e53dd4c"),
i686_windows => Base.SHA1("9390a3c24a8e274e6d7245c6c977f97b406bc3f5"),
),
v"6" => Dict(
x86_64_linux => Base.SHA1("8e18b9a6fd6bebcbf350f4605f59da588c3f91d8"),
ppc64le_linux => Base.SHA1("5595cc99163816896ba3982e458a92086dea590d"),
armv7l_linux => Base.SHA1("f485bbe50a8fc242a40c2a67ca6f23225f5cfcd7"),
aarch64_linux => Base.SHA1("839b5fb66e49f38700c8f6cacadd3cc11785c3bb"),
x86_64_macos => Base.SHA1("b211e8c87b83e820416757d6d2985bcd19db7f24"),
x86_64_linux => Base.SHA1("bd063fc4a57525522f54462cb1babcfb6693f1e4"),
ppc64le_linux => Base.SHA1("bb6ff7eeb4004852224454a66a4e535f7565b754"),
armv7l_linux => Base.SHA1("a4b5121aa50860035aa600b4cd531841cf52f2e7"),
aarch64_linux => Base.SHA1("e461da5c1b23615f774b65d220d450c7fafca803"),
x86_64_macos => Base.SHA1("4ec1fb6c2f0cd1e5fd9c9190a802b28c2d39827c"),
i686_windows => Base.SHA1("ae50af4ca8651cb3c8f71f34d0b66ca0d8f14a99"),
),
)
Expand Down
Loading