Skip to content

Commit

Permalink
Merge pull request #5727 from kit-ty-kate/update-release-2.2.0-alpha3
Browse files Browse the repository at this point in the history
Update the release script according to the opam 2.2.0~alpha3 release process
  • Loading branch information
kit-ty-kate authored Dec 12, 2023
2 parents ddee072 + 2738859 commit 91b8684
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
3 changes: 1 addition & 2 deletions release/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ host: $(OUTDIR)/opam-full-$(VERSION).tar.gz build/$(HOST).env
MAKE=$(MAKE) \
$(EXPORTS_$(HOST_OS)); \
cd build/opam-full-$(VERSION) && \
./configure && \
{ $(MAKE) lib-ext || ./configure --with-vendored-deps; } && \
{ ./configure --with-vendored-deps || { ./configure && $(MAKE) lib-ext; }; } && \
echo "$(call LINKING,$(HOST_OS))" >src/client/linking.sexp && \
$(MAKE) opam; \
)
Expand Down
2 changes: 1 addition & 1 deletion release/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

## Device requirements
* Mac M1
* installed: git, gpg
* installed: git, gpg, qemu>=8.1.0, docker>=24.0.0
* opam repo with the tag fetched
* Have the secret key available
* Launch docker using the Docker GUI macOS app
11 changes: 4 additions & 7 deletions release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ cd "$DIR"
LC_ALL=C
CWD=$(pwd)
JOBS=$(sysctl -n hw.ncpu)
JOBS=$(echo "${JOBS} / 1.5" | bc)
SSH="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"

OUTDIR="out/$TAG"
Expand All @@ -42,13 +41,11 @@ qemu_build() {

if ! ${SSH} -p "${port}" root@localhost true; then
qemu-img convert -O raw "./qemu-base-images/${image}.qcow2" "./qemu-base-images/${image}.raw"
"qemu-system-${arch}" -drive "file=./qemu-base-images/${image}.raw,format=raw" -nic "user,hostfwd=tcp::${port}-:22" -m 2G &
"qemu-system-${arch}" -drive "file=./qemu-base-images/${image}.raw,format=raw" -nic "user,hostfwd=tcp::${port}-:22" -m 2G -smp "${JOBS}" &
sleep 60
fi
${SSH} -p "${port}" root@localhost "${install}"
# NOTE: JOBS=1 because qemu does not support proper multithreading from arm64 to x86_64 yet because of memory model differences.
# See https://wiki.qemu.org/Features/tcg-multithread
make TAG="$TAG" JOBS=1 qemu QEMU_PORT="${port}" REMOTE_MAKE="${make}" REMOTE_DIR=opam-release-$TAG
make TAG="$TAG" JOBS="${JOBS}" qemu QEMU_PORT="${port}" REMOTE_MAKE="${make}" REMOTE_DIR="opam-release-$TAG"
${SSH} -p "${port}" root@localhost "shutdown -p now"
}

Expand All @@ -62,6 +59,6 @@ make JOBS="${JOBS}" TAG="$TAG" s390x-linux
[ -f "${OUTDIR}/opam-$TAG-x86_64-macos" ] || make TAG="$TAG" JOBS="${JOBS}" macos-local MACOS_ARCH=x86_64 REMOTE_DIR=opam-release-$TAG GIT_URL="$CWD/.."
[ -f "${OUTDIR}/opam-$TAG-arm64-macos" ] || make TAG="$TAG" JOBS="${JOBS}" macos-local MACOS_ARCH=arm64 REMOTE_DIR=opam-release-$TAG GIT_URL="$CWD/.."
[ -d ./qemu-base-images ] || git clone https://gitlab.com/kit-ty-kate/qemu-base-images.git
[ -f "${OUTDIR}/opam-$TAG-x86_64-openbsd" ] || qemu_build 9999 OpenBSD-7.0-amd64 "pkg_add gmake curl bzip2" gmake x86_64 &
[ -f "${OUTDIR}/opam-$TAG-x86_64-freebsd" ] || qemu_build 9998 FreeBSD-13.0-RELEASE-amd64 "env IGNORE_OSVERSION=yes pkg install -y gmake curl bzip2" gmake x86_64 &
[ -f "${OUTDIR}/opam-$TAG-x86_64-openbsd" ] || qemu_build 9999 OpenBSD-7.4-amd64 "pkg_add gmake curl bzip2" gmake x86_64 &
[ -f "${OUTDIR}/opam-$TAG-x86_64-freebsd" ] || qemu_build 9998 FreeBSD-13.2-RELEASE-amd64 "pkg install -y gmake curl bzip2" gmake x86_64 &
wait

0 comments on commit 91b8684

Please sign in to comment.