Skip to content
Draft
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
3 changes: 2 additions & 1 deletion pipelines/main/launch_unsigned_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ steps:
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/doctest.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/pdf_docs/build_pdf_docs.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/embedding.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/trimming.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/trimming_linux.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/trimming_windows.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/llvmpasses.yml
# buildkite-agent pipeline upload .buildkite/pipelines/main/misc/whitespace.yml # Currently runs in GitHub Actions instead of Buildkite

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
steps:
- group: "Check"
steps:
- label: "trimming"
key: "trimming"
- label: ":linux: trimming"
key: "trimming_x86_64-linux-gnu"
depends_on:
- "build_x86_64-linux-gnu"
plugins:
Expand All @@ -24,16 +24,13 @@ steps:
if: | # We only run the `trimming` job on Julia 1.12 and later.
(pipeline.slug != "julia-release-1-dot-10") && (pipeline.slug != "julia-release-1-dot-11")
commands: |
# Download pre-built julia, extract into `usr/`
buildkite-agent artifact download --step "build_x86_64-linux-gnu" 'julia-*-linux-x86_64.tar.gz' .
mkdir -p usr
tar -C usr --strip-components=1 -zxf julia-*-linux-x86_64.tar.gz
rm -f julia-*-linux-x86_64.tar.gz

make --output-sync -j$${JULIA_CPU_THREADS:?} -C test/trimming check JULIA="$$(pwd)/usr/bin/julia" BIN="$$(pwd)/usr/bin"
bash .buildkite/utilities/test_trimming.sh
timeout_in_minutes: 60
agents:
queue: "julia"
sandbox_capable: "true"
os: "linux"
arch: "x86_64"
env:
JULIA_SHELL: "/bin/bash"
TRIPLET: "x86_64-linux-gnu"
36 changes: 36 additions & 0 deletions pipelines/main/misc/trimming_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
steps:
- group: "Check"
steps:
- label: ":windows: trimming"
key: "trimming_x86_64-w64-mingw32"
depends_on:
- "build_x86_64-w64-mingw32"
plugins:
- JuliaCI/external-buildkite#v1:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- docker#v3.13.0:
image: "juliapackaging/package-windows-x86_64:v7.10"
always-pull: true
command: ["bash", ".buildkite/utilities/test_trimming.sh"]
propagate-environment: true
volumes:
# Mount buildkite-agent as well
- "C:\\buildkite-agent\\bin:C:\\buildkite-agent\\bin"
environment:
# We have to list this here, because buildkite doesn't automatically
# include environment-hook-set variables in a way that the docker
# plugin finds. It's annoying, but at least we have a workaround.
- "JULIA_CPU_THREADS"
# Have to include this for `buildkite-agent` to work:
- "BUILDKITE_AGENT_ACCESS_TOKEN"
if: | # We only run the `trimming` job on Julia 1.12 and later.
(pipeline.slug != "julia-release-1-dot-10") && (pipeline.slug != "julia-release-1-dot-11")
timeout_in_minutes: 60
agents:
queue: "julia"
os: "windows"
arch: "x86_64"
env:
JULIA_SHELL: "/bin/bash"
TRIPLET: "x86_64-w64-mingw32"
51 changes: 51 additions & 0 deletions utilities/test_trimming.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash

# This script performs the basic steps needed to test Julia previously
# built and uploaded as a `.tar.gz`.
# It requires the following environment variables to be defined:
# - TRIPLET
# - USE_RR
set -euo pipefail

# First, get things like `SHORT_COMMIT`, `JULIA_CPU_TARGET`, `UPLOAD_TARGETS`, etc...
# shellcheck source=SCRIPTDIR/build_envs.sh
source .buildkite/utilities/build_envs.sh

echo "--- Print kernel version"
uname -a

# Usually, we download the build artifacts. However, if we're running inside of the
# `bughunt` tool, for instance, we may already have a Julia unpacked for us.
if [[ ! -d "${JULIA_INSTALL_DIR}/bin" ]]; then
# Note that we pass `--step` to prevent ambiguities between downloading the artifacts
# uploaded by the `build_*` steps vs. the `upload_*` steps. Normally, testing must occur
# first, however in the event of a soft-fail test, we can re-run a test after a successful
# upload has occured.
echo "--- Download build artifacts"
buildkite-agent artifact download --step "build_${TRIPLET}" "${UPLOAD_FILENAME}.tar.gz" .

echo "--- Extract build artifacts"
tar xzf "${UPLOAD_FILENAME}.tar.gz" "${JULIA_INSTALL_DIR}/"
fi

# If we're on macOS, we need to re-sign the downloaded tarball so it will
# execute on this machine
if [[ "${OS}" == "macos" ]]; then
echo "--- [mac] Codesigning"
.buildkite/utilities/macos/codesign.sh "${JULIA_INSTALL_DIR}"
echo "--- [mac] Update checksums for stdlib cachefiles after codesigning"
JULIA_DEBUG=all "${JULIA_INSTALL_DIR}/bin/julia" .buildkite/utilities/update_stdlib_pkgimage_checksums.jl
fi

echo "--- Print Julia version info"
${JULIA_BINARY} -e 'using InteractiveUtils; InteractiveUtils.versioninfo()'

echo "--- Set some environment variables"
# Prevent OpenBLAS from spinning up a large number of threads on our big machines
export OPENBLAS_NUM_THREADS="${JULIA_CPU_THREADS}"
export JULIA_TEST_IS_BASE_CI="true"
unset JULIA_DEPOT_PATH
unset JULIA_PKG_SERVER

echo "--- Run trimming tests"
${MAKE} --output-sync -j"${JULIA_CPU_THREADS:?}" -C test/trimming check JULIA="${JULIA_BINARY:?}" BIN="$(dirname "${JULIA_BINARY:?}")"