Compare commits
22 Commits
4e26a48a6e
...
90bc5848a1
Author | SHA1 | Date |
---|---|---|
Thomas Hobson | 90bc5848a1 | |
Thomas Hobson | 4a9ad97645 | |
Thomas Hobson | c5938dfd40 | |
Thomas Hobson | 8c6552d19e | |
Thomas Hobson | 8b70b7d82e | |
Thomas Hobson | 27598b236c | |
Thomas Hobson | 92899bd880 | |
Thomas Hobson | 0493bcec31 | |
Thomas Hobson | fd8e25608f | |
Thomas Hobson | 92a0b13ba7 | |
Thomas Hobson | 9c2f562e01 | |
Thomas Hobson | b02fe3eefb | |
Thomas Hobson | 53841e0d50 | |
Thomas Hobson | e070c87322 | |
Thomas Hobson | b9d4ca94df | |
Thomas Hobson | 4c7ec9689e | |
Thomas Hobson | 3c5336e516 | |
Thomas Hobson | 49687d4a28 | |
Thomas Hobson | 9589948ea7 | |
Thomas Hobson | 7be0ca1626 | |
Thomas Hobson | 7d7b83e951 | |
Thomas Hobson | 11f415248d |
|
@ -0,0 +1,76 @@
|
|||
name: 'Package Pushed'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- v3
|
||||
paths:
|
||||
- packages/**
|
||||
|
||||
|
||||
jobs:
|
||||
build-pkg:
|
||||
name: Build package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Login to GitHub registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
registry: docker.pkg.github.com
|
||||
|
||||
- name: Get list of changed files
|
||||
uses: lots0logs/gh-action-get-changed-files@2.1.4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build Packages
|
||||
run: |
|
||||
PACKAGES=$(jq '.[]' -r ${HOME}/files.json | awk -F/ '{ print $2 "-" $3 }' | sort -u)
|
||||
echo "Packages: $PACKAGES"
|
||||
docker run -v "${{ github.workspace }}:/piston" docker.pkg.github.com/engineer-man/piston/repo-builder:latest --no-server $PACKAGES
|
||||
ls -la packages
|
||||
|
||||
- name: Upload Packages
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: packages/*.pkg.tar.gz
|
||||
tag: pkgs
|
||||
overwrite: true
|
||||
file_glob: true
|
||||
create-index:
|
||||
name: Create Index
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-pkg
|
||||
steps:
|
||||
- name: "Download all release assets"
|
||||
run: curl -s https://api.github.com/repos/engineer-man/piston/releases/latest | jq '.assets[].browser_download_url' -r | xargs -L 1 curl -sLO
|
||||
- name: "Generate index file"
|
||||
run: |
|
||||
echo "" > index
|
||||
BASEURL=https://github.com/engineer-man/piston/releases/download/pkgs/
|
||||
for pkg in *.pkg.tar.gz
|
||||
do
|
||||
PKGFILE=$(basename $pkg)
|
||||
PKGFILENAME=$(echo $PKGFILE | sed 's/\.pkg\.tar\.gz//g')
|
||||
|
||||
PKGNAME=$(echo $PKGFILENAME | grep -oP '^\K.+(?=-)')
|
||||
PKGVERSION=$(echo $PKGFILENAME | grep -oP '^.+-\K.+')
|
||||
PKGCHECKSUM=$(sha256sum $PKGFILE | awk '{print $1}')
|
||||
echo "$PKGNAME,$PKGVERSION,$PKGCHECKSUM,$BASEURL$PKGFILE" >> index
|
||||
echo "Adding package $PKGNAME-$PKGVERSION"
|
||||
done
|
||||
- name: Upload index
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: index
|
||||
tag: pkgs
|
||||
overwrite: true
|
||||
file_glob: true
|
|
@ -57,7 +57,7 @@ const options = [
|
|||
{
|
||||
key: 'runner_uid_min',
|
||||
desc: 'Minimum uid to use for runner',
|
||||
default: 1000,
|
||||
default: 1001,
|
||||
validators: []
|
||||
},
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ const options = [
|
|||
{
|
||||
key: 'runner_gid_min',
|
||||
desc: 'Minimum gid to use for runner',
|
||||
default: 1000,
|
||||
default: 1001,
|
||||
validators: []
|
||||
},
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ const options = [
|
|||
{
|
||||
key: 'repo_url',
|
||||
desc: 'URL of repo index',
|
||||
default: 'https://github.com',
|
||||
default: 'https://github.com/engineer-man/piston/releases/download/pkgs/index',
|
||||
validators: []
|
||||
}
|
||||
];
|
||||
|
|
|
@ -11,10 +11,11 @@ build build-all: $(addsuffix .pkg.tar.gz, ${PACKAGES})
|
|||
|
||||
|
||||
define PKG_RULE
|
||||
$(1).pkg.tar.gz: $(subst -,/,$(1))/ $(subst -,/,$(1))/pkg-info.json
|
||||
$(1).pkg.tar.gz: $(subst -,/,$(1)) $(subst -,/,$(1))/pkg-info.json
|
||||
cd $$< && chmod +x ./build.sh && ./build.sh
|
||||
rm -f $$@
|
||||
tar czf $$@ $$< --transform='s|$$<||'
|
||||
|
||||
tar czf $$@ -C $$< .
|
||||
endef
|
||||
|
||||
$(foreach pkg,$(PACKAGES),$(eval $(call PKG_RULE,$(pkg))))
|
||||
|
|
|
@ -18,3 +18,4 @@ make -j$(nproc)
|
|||
make install -j$(nproc)
|
||||
cd ../
|
||||
rm -rf build
|
||||
|
||||
|
|
|
@ -8,4 +8,4 @@ rm dart.zip
|
|||
cp -r dart-sdk/* .
|
||||
rm -rf dart-sdk
|
||||
|
||||
chmod -R +rx bin
|
||||
chmod -R +rx bin
|
||||
|
|
|
@ -2,4 +2,4 @@ curl -L https://github.com/denoland/deno/releases/download/v1.7.5/deno-x86_64-un
|
|||
unzip -o deno.zip
|
||||
rm deno.zip
|
||||
|
||||
chmod +x deno
|
||||
chmod +x deno
|
||||
|
|
|
@ -18,3 +18,4 @@ make -j$(nproc)
|
|||
make install -j$(nproc)
|
||||
cd ../
|
||||
rm -rf build
|
||||
|
||||
|
|
|
@ -23,3 +23,4 @@ make -j$(nproc)
|
|||
make install -j$(nproc)
|
||||
cd ../
|
||||
rm -rf build obj
|
||||
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
curl -LO https://golang.org/dl/go1.16.2.linux-amd64.tar.gz
|
||||
tar -xzf go1.16.2.linux-amd64.tar.gz
|
||||
rm go1.16.2.linux-amd64.tar.gz
|
||||
|
||||
|
|
|
@ -6,3 +6,4 @@ curl "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48e
|
|||
|
||||
tar xzf java.tar.gz --strip-components=1
|
||||
rm java.tar.gz
|
||||
|
||||
|
|
|
@ -9,4 +9,4 @@ cd build/jelly
|
|||
../../bin/python3.9 setup.py install --optimize=1
|
||||
|
||||
cd ../../
|
||||
rm -rf build
|
||||
rm -rf build
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
curl -OL https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.4-linux-x86_64.tar.gz
|
||||
tar zxvf julia-1.5.4-linux-x86_64.tar.gz
|
||||
rm julia-1.5.4-linux-x86_64.tar.gz
|
||||
|
||||
|
|
|
@ -7,4 +7,4 @@ unzip kotlin.zip
|
|||
rm kotlin.zip
|
||||
|
||||
cp -r kotlinc/* .
|
||||
rm -rf kotlinc
|
||||
rm -rf kotlinc
|
||||
|
|
|
@ -17,3 +17,4 @@ make install -j$(nproc)
|
|||
|
||||
cd ../../
|
||||
rm -rf build
|
||||
|
||||
|
|
|
@ -18,3 +18,4 @@ make -j$(nproc)
|
|||
make install -j$(nproc)
|
||||
cd ../
|
||||
rm -rf build
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
curl "https://nodejs.org/dist/v15.10.0/node-v15.10.0-linux-x64.tar.xz" -o node.tar.xz
|
||||
tar xf node.tar.xz --strip-components=1
|
||||
rm node.tar.xz
|
||||
rm node.tar.xz
|
||||
|
|
|
@ -17,4 +17,4 @@ make -j$(nproc)
|
|||
make install -j$(nproc)
|
||||
|
||||
cd ../../
|
||||
rm -rf build
|
||||
rm -rf build
|
||||
|
|
|
@ -18,3 +18,4 @@ cd ..
|
|||
|
||||
rm -rf build
|
||||
|
||||
|
||||
|
|
|
@ -17,3 +17,4 @@ make install -j$(nproc)
|
|||
cd ..
|
||||
|
||||
rm -rf build
|
||||
|
||||
|
|
|
@ -4,4 +4,4 @@ source ../../node/15.10.0/build.sh
|
|||
|
||||
source ./environment
|
||||
|
||||
bin/npm install -g typescript@4.2.3
|
||||
bin/npm install -g typescript@4.2.3
|
||||
|
|
|
@ -23,7 +23,7 @@ do
|
|||
else
|
||||
if [[ $BUILD -eq 1 ]]; then
|
||||
echo "Building package $pkg"
|
||||
make -j16 $pkg.pkg.tar.gz
|
||||
make -j16 $pkg.pkg.tar.gz PLATFORM=docker-debian
|
||||
echo "Done with package $pkg"
|
||||
elif [[ $CI -eq 1 ]]; then
|
||||
echo "Commit SHA: $pkg"
|
||||
|
@ -36,7 +36,7 @@ do
|
|||
|
||||
echo "Building packages: $PACKAGES"
|
||||
for package in "$PACKAGES"; do
|
||||
make -j16 $package.pkg.tar.gz
|
||||
make -j16 $package.pkg.tar.gz PLATFORM=docker-debian
|
||||
done
|
||||
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue