Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Ship reggae with prebuilt packages #3739

Merged
merged 1 commit into from
May 31, 2021
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
2 changes: 2 additions & 0 deletions .azure-pipelines/2-posix-build_cross_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# - PARALLEL_JOBS
# Exported env vars:
# - DFLAGS
# - CROSS_TRIPLE
# - EXTRA_CMAKE_FLAGS_ANDROID

steps:
Expand Down Expand Up @@ -48,6 +49,7 @@ steps:
DFLAGS="-mtriple=$LLVM_TRIPLE -L-L$PWD/ldc-build-runtime.tmp/lib -gcc=$PWD/android-ndk-$ANDROID_NDK_VERSION/toolchains/llvm/prebuilt/linux-x86_64/bin/$ARCH-linux-${androidEnv}21-clang"
set +x
echo "##vso[task.setvariable variable=DFLAGS]$DFLAGS"
echo "##vso[task.setvariable variable=CROSS_TRIPLE]$LLVM_TRIPLE"
displayName: Set up cross-compilation

# Cross-compile default libraries
Expand Down
2 changes: 2 additions & 0 deletions .azure-pipelines/2-posix-build_cross_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# - PARALLEL_JOBS
# Exported env vars:
# - DFLAGS
# - CROSS_TRIPLE

steps:

Expand All @@ -27,6 +28,7 @@ steps:
DFLAGS="-mtriple=$triple -L-L$PWD/ldc-build-runtime.tmp/lib -Xcc=-target -Xcc=$triple -Xcc=-isysroot -Xcc=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
set +x
echo "##vso[task.setvariable variable=DFLAGS]$DFLAGS"
echo "##vso[task.setvariable variable=CROSS_TRIPLE]$triple"
displayName: Set up cross-compilation

# Cross-compile default libraries
Expand Down
17 changes: 16 additions & 1 deletion .azure-pipelines/6-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
# - ARCH
# - CI_OS
# - EXTRA_CMAKE_FLAGS_CROSS (optional)
# - CROSS_TRIPLE (optional)

steps:

# Add dub & dlang tools
# Add dub, dlang tools & reggae
- bash: |
set -e
cd ..
Expand Down Expand Up @@ -43,6 +44,20 @@ steps:
$DMD -w -de -dip1000 DustMite/dustmite.d DustMite/splitter.d DustMite/polyhash.d -of=bin/dustmite
cp bin/{rdmd,ddemangle,dustmite} ../installed/bin
displayName: Build & copy dlang tools
- bash: |
set -ex
cd ..
git clone --recursive https://github.com/atilaneves/reggae.git
cd reggae
git checkout "$(cat $BUILD_SOURCESDIRECTORY/packaging/reggae_version)"
DFLAGS="-O $DFLAGS" ../host-ldc/bin/dub build -v --build-mode=allAtOnce --combined \
Copy link
Member Author

@kinke kinke May 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--build-mode=allAtOnce is a workaround for the dub issue fixed in dlang/dub#2135 - compiling & linking at once avoids the 'linker D flag' filtering.

--combined for a similar effect as LTO, compiling reggae and its dub library dependency to a single object file.

--compiler="$(dirname "$DMD")/ldc2" \
${CROSS_TRIPLE:+--arch="$CROSS_TRIPLE"}
cp bin/reggae ../installed/bin
if [[ "$EXTRA_CMAKE_FLAGS_CROSS" == "" ]]; then
../installed/bin/reggae --version -b ninja
fi
displayName: Build & copy reggae

# Pack & publish artifact(s)
- bash: |
Expand Down
9 changes: 9 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@ task:
$DMD -w -de -dip1000 ddemangle.d -of=bin/ddemangle
$DMD -w -de -dip1000 DustMite/dustmite.d DustMite/splitter.d DustMite/polyhash.d -of=bin/dustmite
cp bin/{rdmd,ddemangle,dustmite} ../installed/bin
# Build & copy reggae
build_reggae_script: |
cd $CIRRUS_WORKING_DIR/..
git clone --recursive https://github.com/atilaneves/reggae.git
cd reggae
git checkout "$(cat $CIRRUS_WORKING_DIR/packaging/reggae_version)"
DFLAGS="-O" ../dub/bin/dub build -v --combined --compiler="$PWD/../installed/bin/ldc2"
cp bin/reggae ../installed/bin
../installed/bin/reggae --version -b ninja
# Pack artifact
pack_artifact_script: |
cd $CIRRUS_WORKING_DIR/..
Expand Down
1 change: 1 addition & 0 deletions packaging/reggae_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.9.1