-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
157 additions
and
68 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,41 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags-ignore: | ||
- '*' | ||
pull_request: | ||
|
||
jobs: | ||
x86_64-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Docker build | ||
run: docker build -t skaji/relocatable-perl -f build/Dockerfile . | ||
darwin-2level: | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Show macOS Version | ||
run: sw_vers | ||
- name: Prepare tools | ||
run: | | ||
set -euxo pipefail | ||
export HOMEBREW_NO_AUTO_UPDATE=1 | ||
brew unlink $(brew list --formula) | ||
brew install xz coreutils gnu-tar | ||
brew link --force xz coreutils gnu-tar | ||
- name: Build Perl | ||
run: | | ||
set -euxo pipefail | ||
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin | ||
curl -fsSL https://git.io/perl-install | bash -s ~/perl | ||
curl -fsSL --compressed -o ~/cpm https://git.io/cpm | ||
~/perl/bin/perl ~/cpm install -g --cpanfile build/cpanfile | ||
sudo install -m 755 -o $USER -g staff -d /opt/perl | ||
~/perl/bin/perl build/relocatable-perl-build --prefix /opt/perl --perl_version $(cat BUILD_VERSION) | ||
/opt/perl/bin/perl ~/cpm install -g App::cpanminus App::ChangeShebang | ||
/opt/perl/bin/change-shebang -f /opt/perl/bin/* |
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,115 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
x86_64-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Docker build | ||
run: docker build -t skaji/relocatable-perl -f build/Dockerfile . | ||
- name: Create Artifacts | ||
run: | | ||
set -euxo pipefail | ||
mkdir x86_64-linux | ||
ID=$(docker create skaji/relocatable-perl) | ||
docker cp $ID:/perl-x86_64-linux.tar.gz x86_64-linux/ | ||
docker cp $ID:/perl-x86_64-linux.tar.xz x86_64-linux/ | ||
docker rm $ID | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: x86_64-linux | ||
path: x86_64-linux | ||
darwin-2level: | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Show macOS Version | ||
run: sw_vers | ||
- name: Prepare tools | ||
run: | | ||
set -euxo pipefail | ||
export HOMEBREW_NO_AUTO_UPDATE=1 | ||
brew unlink $(brew list --formula) | ||
brew install xz coreutils gnu-tar | ||
brew link --force xz coreutils gnu-tar | ||
- name: Build Perl | ||
run: | | ||
set -euxo pipefail | ||
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin | ||
curl -fsSL https://git.io/perl-install | bash -s ~/perl | ||
curl -fsSL --compressed -o ~/cpm https://git.io/cpm | ||
~/perl/bin/perl ~/cpm install -g --cpanfile build/cpanfile | ||
sudo install -m 755 -o $USER -g staff -d /opt/perl | ||
~/perl/bin/perl build/relocatable-perl-build --prefix /opt/perl --perl_version $(cat BUILD_VERSION) | ||
/opt/perl/bin/perl ~/cpm install -g App::cpanminus App::ChangeShebang | ||
/opt/perl/bin/change-shebang -f /opt/perl/bin/* | ||
- name: Create Artifacts | ||
run: | | ||
set -euxo pipefail | ||
mkdir darwin-2level | ||
gcp -r /opt/perl ./perl-darwin-2level | ||
gtar cf perl-darwin-2level.tar perl-darwin-2level | ||
gzip -9 --stdout perl-darwin-2level.tar > darwin-2level/perl-darwin-2level.tar.gz | ||
xz -9 --stdout perl-darwin-2level.tar > darwin-2level/perl-darwin-2level.tar.xz | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darwin-2level | ||
path: darwin-2level | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- x86_64-linux | ||
- darwin-2level | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: x86_64-linux | ||
path: x86_64-linux | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: darwin-2level | ||
path: darwin-2level | ||
- uses: actions/create-release@v1 | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
- uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: x86_64-linux/perl-x86_64-linux.tar.gz | ||
asset_name: perl-x86_64-linux.tar.gz | ||
asset_content_type: application/gzip | ||
- uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: x86_64-linux/perl-x86_64-linux.tar.xz | ||
asset_name: perl-x86_64-linux.tar.xz | ||
asset_content_type: application/x-xz | ||
- uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: darwin-2level/perl-darwin-2level.tar.gz | ||
asset_name: perl-darwin-2level.tar.gz | ||
asset_content_type: application/gzip | ||
- uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: darwin-2level/perl-darwin-2level.tar.xz | ||
asset_name: perl-darwin-2level.tar.xz | ||
asset_content_type: application/x-xz |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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