Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3455 from rakudo/cci-precomp-build
Add a CI precomp release build pipeline
- Loading branch information
Showing
5 changed files
with
256 additions
and
1 deletion.
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
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,40 @@ | ||
#!/usr/bin/env sh | ||
|
||
# This script should be run in a CentOS 6 installation (a container will do | ||
# just fine). | ||
|
||
set -o errexit | ||
set -o pipefail | ||
|
||
# Update CentOS 6 | ||
yum -y update | ||
yum clean all | ||
|
||
# Install dependencies | ||
yum -y install curl git perl perl-core gcc make | ||
|
||
# Download release file | ||
curl -o rakudo.tgz $RELEASE_URL | ||
tar -xzf rakudo.tgz | ||
cd rakudo-* | ||
|
||
# Build Rakudo | ||
perl Configure.pl --gen-moar --gen-nqp --backends=moar --relocatable | ||
make | ||
make install | ||
|
||
# Test the build | ||
make test | ||
|
||
# Build Zef | ||
git clone https://github.com/ugexe/zef.git | ||
pushd zef | ||
../install/bin/raku -I. bin/zef install . | ||
popd | ||
|
||
# Prepare the package | ||
cp -r tools/build/binary-release/Linux/* install | ||
cp LICENSE install | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o pipefail | ||
|
||
# Install Dependencies | ||
brew install perl | ||
brew install gnu-tar | ||
|
||
# Download release file | ||
curl -o rakudo.tgz $RELEASE_URL | ||
tar -xzf rakudo.tgz | ||
cd rakudo-* | ||
|
||
# Build Rakudo | ||
perl Configure.pl --gen-moar --gen-nqp --backends=moar --relocatable | ||
make | ||
make install | ||
|
||
# Test the build | ||
make test | ||
|
||
# Build Zef | ||
git clone https://github.com/ugexe/zef.git | ||
pushd zef | ||
../install/bin/raku -I. bin/zef install . | ||
popd | ||
|
||
# Prepare the package | ||
cp -r tools/build/binary-release/MacOS/* install | ||
cp LICENSE install | ||
mv install rakudo-$VERSION | ||
gtar -zcv --owner=0 --group=0 --numeric-owner -f ../rakudo-macos.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
# Don't display progressbars when doing Invoke-WebRequest and similar. | ||
# That would cause the command to fail, because in the CircleCI environment | ||
# one can't modify the display. | ||
# "Win32 internal error “Access is denied” 0x5 occurred while reading the console output buffer. Contact Microsoft Customer Support Services." | ||
$progressPreference = 'silentlyContinue' | ||
|
||
function CheckLastExitCode { | ||
if ($LastExitCode -ne 0) { | ||
$msg = @" | ||
Program failed with: $LastExitCode | ||
Callstack: $(Get-PSCallStack | Out-String) | ||
"@ | ||
throw $msg | ||
} | ||
} | ||
|
||
|
||
# Install Perl | ||
|
||
mkdir download | ||
mkdir strawberry | ||
Invoke-WebRequest http://strawberryperl.com/download/5.30.0.1/strawberry-perl-5.30.0.1-64bit.zip -OutFile download/strawberry-perl-5.30.0.1-64bit.zip | ||
Expand-Archive -Path download/strawberry-perl-5.30.0.1-64bit.zip -DestinationPath strawberry | ||
strawberry\relocation.pl.bat | ||
$Env:PATH = (Join-Path -Path $repoPath -ChildPath "\strawberry\perl\bin") + ";" + (Join-Path -Path $repoPath -ChildPath "\strawberry\perl\site\bin") + ";" + (Join-Path -Path $repoPath -ChildPath "\strawberry\c\bin") + ";$Env:PATH" | ||
|
||
|
||
# Download release file | ||
|
||
Invoke-WebRequest $Env:RELEASE_URL -OutFile download/rakudo.tgz | ||
tar -xzf download/rakudo.tgz . | ||
cd rakudo-* | ||
|
||
# Build Rakudo | ||
|
||
perl Configure.pl --gen-moar --gen-nqp --backends=moar --relocatable | ||
CheckLastExitCode | ||
nmake install | ||
CheckLastExitCode | ||
|
||
|
||
# Test the build | ||
|
||
nmake test | ||
CheckLastExitCode | ||
|
||
|
||
# Build Zef | ||
|
||
git clone https://github.com/ugexe/zef.git | ||
CheckLastExitCode | ||
cd zef | ||
..\install\bin\raku.exe -I. bin\zef install . | ||
CheckLastExitCode | ||
|
||
|
||
# Prepare the package | ||
|
||
cp -r "tools\build\binary-release\Windows\*" install | ||
cp LICENSE install | ||
|
||
$version = Get-Content -Path .\VERSION -Raw | ||
$version = $version.Trim() | ||
mv install rakudo-$version | ||
|
||
Compress-Archive -Path rakudo-$version -DestinationPath ..\rakudo-win.zip | ||
|
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,25 @@ | ||
#!/usr/bin/env sh | ||
|
||
if [ $# -lt 4 ]; then | ||
echo 'You need to pass:' | ||
echo ' - version of the release, e.g. "2020.01"' | ||
echo ' - build revision, typically "01"' | ||
echo ' - URL of a release .tgz file' | ||
echo ' - a CircleCI token' | ||
exit 1 | ||
fi | ||
|
||
curl \ | ||
-u $4: \ | ||
-X POST \ | ||
-H 'Content-Type: application/json' \ | ||
-d "{ | ||
\"parameters\": { | ||
\"BUILD_PRECOMP_RELEASE\": true, | ||
\"RELEASE_URL\": \"$3\", | ||
\"VERSION\": \"$1\", | ||
\"BUILD_REV\": \"$2\" | ||
} | ||
}" \ | ||
https://circleci.com/api/v2/project/gh/rakudo/rakudo/pipeline | ||
|