-
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows to build Rakudo releases on Windows, MacOS and Linux. No limit on credits. Add status prints to precomp release build scripts. This makes them a bit more transparent to how long the build will take and where they hang.
- Loading branch information
Showing
4 changed files
with
186 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# This is the Azure Pipelines configuration to create the precompiled release | ||
# archives that are made available at <https://rakudo.org>. | ||
# | ||
# To trigger a build, go to <https://dev.azure.com/infra0037/raku/...> and | ||
# start a run of the precompile-release pipeline. | ||
# | ||
# The following pipeline variables are required: | ||
# | ||
# RELEASE_URL: Release archive to build. e.g. "https://rakudo.org/dl/rakudo/rakudo-2020.05.tar.gz" | ||
# VERSION: The version that you are building. e.g. "2020.05" | ||
# REVISION: Usually "01" | ||
# | ||
|
||
trigger: | ||
- none | ||
|
||
jobs: | ||
- job: linux | ||
displayName: Linux x86_64 build | ||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
container: | ||
image: centos:6 | ||
options: "--name raku-build-container -v /usr/bin/docker:/tmp/docker:ro" | ||
workspace: | ||
clean: all | ||
steps: | ||
- script: /tmp/docker exec -t -u 0 raku-build-container sh -c "yum -y update && yum -y install sudo" | ||
displayName: Set up sudo (see https://github.com/microsoft/azure-pipelines-agent/issues/2043) | ||
|
||
- checkout: self | ||
path: source | ||
fetchDepth: 1 | ||
displayName: Checkout repository | ||
|
||
- script: $(Agent.BuildDirectory)/source/tools/build/binary-release/build-linux.sh | ||
failOnStderr: false | ||
displayName: Run build script | ||
|
||
- publish: rakudo-linux.tar.gz | ||
artifact: rakudo-linux | ||
|
||
- job: macos | ||
displayName: MacOS x86_64 build | ||
pool: | ||
vmImage: 'macOS-10.15' | ||
workspace: | ||
clean: all | ||
steps: | ||
- checkout: self | ||
path: source | ||
fetchDepth: 1 | ||
|
||
- script: $(Agent.BuildDirectory)/source/tools/build/binary-release/build-macos.sh | ||
failOnStderr: false | ||
displayName: Run build script | ||
|
||
- publish: rakudo-macos.tar.gz | ||
artifact: rakudo-macos | ||
|
||
- job: windows | ||
displayName: Windows x86_64 build | ||
pool: | ||
vmImage: 'windows-2019' | ||
workspace: | ||
clean: all | ||
steps: | ||
- checkout: self | ||
path: source | ||
fetchDepth: 1 | ||
|
||
# Turn this Powershell console into a developer powershell console. | ||
# https://intellitect.com/enter-vsdevshell-powershell/ | ||
- pwsh: | | ||
$installPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationpath | ||
$devShell = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find **\Microsoft.VisualStudio.DevShell.dll | ||
Import-Module $devShell | ||
Enter-VsDevShell -VsInstallPath $installPath -SkipAutomaticLocation -DevCmdArguments "-arch=amd64" | ||
$(Agent.BuildDirectory)/source/tools/build/binary-release/build-windows.ps1 | ||
failOnStderr: false | ||
displayName: Run build script | ||
- publish: rakudo-win.zip | ||
artifact: rakudo-win | ||
|
||
- job: zip | ||
displayName: Package results | ||
dependsOn: | ||
- linux | ||
- macos | ||
- windows | ||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
workspace: | ||
clean: all | ||
steps: | ||
- checkout: none | ||
|
||
- download: current | ||
artifact: rakudo-linux | ||
displayName: Download Linux build artifacts | ||
|
||
- download: current | ||
artifact: rakudo-macos | ||
displayName: Download MacOS build artifacts | ||
|
||
- download: current | ||
artifact: rakudo-win | ||
displayName: Download Windows build artifacts | ||
|
||
- script: | | ||
OUT_DIR=rakudo-builds-$(VERSION)-$(REVISION) | ||
mkdir $OUT_DIR | ||
cp $(Pipeline.Workspace)/rakudo-linux/rakudo-linux.tar.gz $OUT_DIR/rakudo-moar-$(VERSION)-$(REVISION)-linux-x86_64.tar.gz | ||
cp $(Pipeline.Workspace)/rakudo-macos/rakudo-macos.tar.gz $OUT_DIR/rakudo-moar-$(VERSION)-$(REVISION)-linux-x86_64.tar.gz | ||
cp $(Pipeline.Workspace)/rakudo-win/rakudo-win.zip $OUT_DIR/rakudo-moar-$(VERSION)-$(REVISION)-win-x86_64.zip | ||
tar -czf rakudo-moar-builds-$(VERSION)-$(REVISION).tar.gz $OUT_DIR | ||
- publish: rakudo-moar-builds-$(VERSION)-$(REVISION).tar.gz | ||
artifact: build-result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,55 @@ | ||
#!/usr/bin/env sh | ||
|
||
# This script should be run in a CentOS 6 installation (a container will do | ||
# just fine). | ||
# This script should be allowed to run sudo in a CentOS 6 installation (a | ||
# container will do just fine). | ||
# For some strange reason the environment variables are lost when running this | ||
# script with `sudo` in azure pipelines. So we just do sudo our selves for the | ||
# dependency install part. | ||
|
||
set -o errexit | ||
set -o pipefail | ||
|
||
# Update CentOS 6 | ||
yum -y update | ||
yum clean all | ||
echo "========= Starting build" | ||
|
||
# Install dependencies | ||
yum -y install curl git perl perl-core gcc make | ||
echo "========= Updating CentOS 6" | ||
sudo yum -y update | ||
sudo yum clean all | ||
|
||
# Download release file | ||
echo "========= Downloading dependencies" | ||
sudo yum -y install curl git perl perl-core gcc make | ||
|
||
echo "========= Downloading release" | ||
curl -o rakudo.tgz $RELEASE_URL | ||
|
||
echo "========= Extracting release" | ||
tar -xzf rakudo.tgz | ||
cd rakudo-* | ||
|
||
# Build Rakudo | ||
echo "========= Configuring Rakudo (includes building MoarVM and NQP)" | ||
perl Configure.pl --gen-moar --gen-nqp --backends=moar --moar-option='--toolchain=gnu' --relocatable | ||
|
||
echo "========= Building Rakudo" | ||
make | ||
|
||
echo "========= Installing Rakudo" | ||
make install | ||
|
||
# Test the build | ||
echo "========= Testing Rakudo" | ||
make test | ||
|
||
# Build Zef | ||
echo "========= Cloning Zef" | ||
git clone https://github.com/ugexe/zef.git | ||
|
||
echo "========= Installing Zef" | ||
pushd zef | ||
../install/bin/raku -I. bin/zef install . | ||
popd | ||
|
||
# Prepare the package | ||
echo "========= Copying auxiliary files" | ||
cp -r tools/build/binary-release/Linux/* install | ||
cp LICENSE install | ||
|
||
echo "========= Preparing archive" | ||
mv install rakudo-$VERSION | ||
tar -zcv --owner=0 --group=0 --numeric-owner -f ../rakudo-linux.tar.gz rakudo-$VERSION | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters