Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
arti
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jim Newsome
arti
Commits
31c0c7f1
Commit
31c0c7f1
authored
4 months ago
by
Jim Newsome
Browse files
Options
Downloads
Patches
Plain Diff
CI: Only build shadow once
parent
286a6742
No related branches found
Branches containing commit
Tags
tor-0.0.8pre2
Tags containing commit
No related merge requests found
Pipeline
#205511
passed
4 months ago
Stage: check
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+43
-51
43 additions, 51 deletions
.gitlab-ci.yml
with
43 additions
and
51 deletions
.gitlab-ci.yml
+
43
−
51
View file @
31c0c7f1
...
...
@@ -416,6 +416,46 @@ build-repro-macos:
paths
:
-
osxcross/target
# We use shadow in multiple tests. Build it here once.
build-shadow
:
stage
:
build
variables
:
JOB_SHADOW_REPO
:
"
https://github.com/shadow/shadow.git"
JOB_SHADOW_BRANCH
:
"
main"
# This commit has not-yet-released support for running scripts directly.
JOB_SHADOW_COMMIT
:
"
66bffbe041f6818a8d2fb94ae3ade69924197d92"
artifacts
:
paths
:
-
opt/shadow
# Intended for consumption later in the pipeline; no need to keep them
# around for longer.
expire_in
:
1 day
cache
:
-
key
:
$CI_JOB_NAME-shadow-$JOB_SHADOW_COMMIT
paths
:
-
opt/shadow
tags
:
-
amd64
script
:
# Build shadow
-
|
if [ -f opt/shadow/bin/shadow ]
then
echo "Using shadow binary from cache"
else
echo "Building shadow"
maint/common/apt-install git
git clone --shallow-since=2021-08-01 -b $JOB_SHADOW_BRANCH $JOB_SHADOW_REPO ~/src/shadow
cd ~/src/shadow
git checkout $JOB_SHADOW_COMMIT
export CC=gcc CXX=g++ CONTAINER=debian:12-slim BUILDTYPE=release RUSTPROFILE=minimal
ci/container_scripts/install_deps.sh
ci/container_scripts/install_extra_deps.sh
export PATH="$HOME/.cargo/bin:${PATH}"
./setup build --jobs $(nproc) --prefix $CI_PROJECT_DIR/opt/shadow
./setup install
fi
integration-chutney
:
stage
:
test
rules
:
...
...
@@ -435,23 +475,14 @@ integration-chutney:
# Runs the chutney integration test under shadow.
integration-chutney-shadow
:
variables
:
JOB_SHADOW_REPO
:
"
https://github.com/shadow/shadow.git"
JOB_SHADOW_BRANCH
:
"
main"
# Unreleased support for running scripts directly.
JOB_SHADOW_COMMIT
:
"
66bffbe041f6818a8d2fb94ae3ade69924197d92"
stage
:
test
cache
:
-
key
:
$CI_JOB_NAME-shadow-$JOB_SHADOW_COMMIT
paths
:
-
opt/shadow
tags
:
-
amd64
# Non-TPA runners may not support running shadow.
-
tpa
script
:
-
./maint/preserve -u
-
maint/common/apt-install tor git python3 curl dnsutils stow
-
maint/common/apt-install tor git python3 curl dnsutils stow
python3-yaml
# arti runtime dependencies
-
maint/common/apt-install libsqlite3-0 libssl3
...
...
@@ -461,25 +492,7 @@ integration-chutney-shadow:
-
git clone https://gitlab.torproject.org/tpo/core/chutney
-
export CHUTNEY_PATH="$(pwd)/chutney"
# Build shadow
# TODO: move this to a separate job and share with integration-shadow
-
|
if [ -f opt/shadow/bin/shadow ]
then
echo "Using shadow binary from cache"
else
echo "Building shadow"
git clone --shallow-since=2021-08-01 -b $JOB_SHADOW_BRANCH $JOB_SHADOW_REPO ~/src/shadow
pushd ~/src/shadow
git checkout $JOB_SHADOW_COMMIT
export CC=gcc CXX=g++ CONTAINER=debian:12-slim BUILDTYPE=release RUSTPROFILE=minimal
ci/container_scripts/install_deps.sh
ci/container_scripts/install_extra_deps.sh
export PATH="$HOME/.cargo/bin:${PATH}"
./setup build --jobs $(nproc) --prefix $CI_PROJECT_DIR/opt/shadow
./setup install
popd
fi
# Set up shadow, built in build-shadow
-
maint/common/apt-install libglib2.0-0
-
stow -d opt -t $HOME/.local shadow
...
...
@@ -490,10 +503,6 @@ integration-chutney-shadow:
integration-shadow
:
variables
:
JOB_SHADOW_REPO
:
"
https://github.com/shadow/shadow.git"
JOB_SHADOW_BRANCH
:
"
main"
JOB_SHADOW_COMMIT
:
"
v3.2.0"
JOB_TGEN_REPO
:
"
https://github.com/shadow/tgen.git"
JOB_TGEN_BRANCH
:
"
main"
JOB_TGEN_COMMIT
:
"
v1.1.2"
...
...
@@ -514,24 +523,7 @@ integration-shadow:
# arti runtime dependencies
-
maint/common/apt-install libsqlite3-0 libssl3
# Build shadow
-
|
if [ -f opt/shadow/bin/shadow ]
then
echo "Using shadow binary from cache"
else
echo "Building shadow"
git clone --shallow-since=2021-08-01 -b $JOB_SHADOW_BRANCH $JOB_SHADOW_REPO ~/src/shadow
pushd ~/src/shadow
git checkout $JOB_SHADOW_COMMIT
export CC=gcc CXX=g++ CONTAINER=debian:12-slim BUILDTYPE=release RUSTPROFILE=minimal
ci/container_scripts/install_deps.sh
ci/container_scripts/install_extra_deps.sh
export PATH="$HOME/.cargo/bin:${PATH}"
./setup build --jobs $(nproc) --prefix $CI_PROJECT_DIR/opt/shadow
./setup install
popd
fi
# Set up shadow, built in build-shadow
-
maint/common/apt-install libglib2.0-0
-
stow -d opt -t $HOME/.local shadow
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment