Skip to content

Commit

Permalink
CI: upload _install_ci instead of _build_ci
Browse files Browse the repository at this point in the history
This means we shouldn't run dependencies of the current job, so we
stop going through Makefile.ci.

Also remove duplicated transitive deps.

Probably won't work on jobs like elpi_test which expect to run in the
build dir of its dependencies, but let's see how it does for the rest.
  • Loading branch information
SkySkimmer committed Dec 17, 2024
1 parent 8e6284f commit 58cefec
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
21 changes: 14 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,16 @@ before_script:
extends: .auto-use-tags
script:
- ulimit -S -s 16384 # For flambda + native
- make -f Makefile.ci -j "$NJOBS" "$(echo ${CI_JOB_NAME#*:} | sed -e 's/+.*$//')"
# set CI_TARGETS from job name if not already provided, then print
- echo CI_TARGETS = ${CI_TARGETS:=${CI_JOB_NAME#*:ci-}}
- for target in $CI_TARGETS; do dev/ci/ci-wrapper.sh "$target"; done
after_script:
- dev/tools/list-potential-artifacts.sh > available_artifacts.txt
- dev/tools/cleanup-artifacts.sh downloaded_artifacts.txt available_artifacts.txt
artifacts:
name: "$CI_JOB_NAME"
paths:
- _build_ci
- stdlib/_build
exclude: # reduce artifact size
- _build_ci/**/.git # exclude .git directory itself as well
- _build_ci/**/.git/**/*
- _install_ci
when: always
expire_in: 1 week
needs:
Expand Down Expand Up @@ -947,6 +945,8 @@ library:ci-stdlib:

library:ci-stdlib+flambda:
extends: .ci-template-flambda
variables:
CI_TARGETS: "stdlib"

library:ci-stdlib_test:
extends: .ci-template
Expand Down Expand Up @@ -1033,6 +1033,8 @@ library:ci-http:
- library:ci-itree_io
- plugin:ci-quickchick
stage: build-3+
variables:
CI_TARGETS: "ceres parsec json async_test http"

library:ci-trakt:
extends: .ci-template-flambda
Expand All @@ -1056,6 +1058,7 @@ plugin:ci-atbr:
- build:edge+flambda
- library:ci-stdlib+flambda

# XXX does this actually need stdlib? Makefile.ci says no
plugin:ci-autosubst_ocaml:
extends: .ci-template-flambda
needs:
Expand Down Expand Up @@ -1097,6 +1100,8 @@ plugin:ci-elpi_hb:
needs:
- build:edge+flambda
- library:ci-stdlib+flambda
variables:
CI_TARGETS: "elpi hb"

plugin:ci-elpi_test:
extends: .ci-template-flambda
Expand Down Expand Up @@ -1154,6 +1159,8 @@ plugin:ci-mtac2:
needs:
- build:edge+flambda
- library:ci-stdlib+flambda
variables:
CI_TARGETS: "unicoq mtac2"

plugin:ci-paramcoq:
extends: .ci-template-flambda
Expand All @@ -1165,7 +1172,7 @@ plugin:ci-perennial:
extends: .ci-template-flambda
needs:
- build:edge+flambda
- library:ci-stdlib
- library:ci-stdlib+flambda

plugin:plugin-tutorial:
stage: build-0
Expand Down
8 changes: 3 additions & 5 deletions dev/tools/cleanup-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ awk 'BEGIN{while( (getline k < "'"$before"'")>0 ){a[k]}} $0 in a' "$after" > rem

xargs -a removed_artifacts.txt rm

for d in _build_ci stdlib/_build; do
if [ -d $d ]; then
find $d -type d -empty -delete
fi
done
if [ -d _install_ci ]; then
find _install_ci -type d -empty -delete
fi
8 changes: 3 additions & 5 deletions dev/tools/list-potential-artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/sh

for d in _build_ci stdlib/_build; do
if [ -d $d ]; then
find $d -type f -o -type l | sort
fi
done
if [ -d _install_ci ]; then
find _install_ci -type f -o -type l | sort
fi

0 comments on commit 58cefec

Please sign in to comment.