Compare commits

..

No commits in common. "90bc5848a12f12e65a7be432dee927fcf0f43772" and "4e26a48a6e153bda3d49543e929b0d59fd9ef33e" have entirely different histories.

23 changed files with 14 additions and 101 deletions

View File

@ -1,76 +0,0 @@
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

View File

@ -57,7 +57,7 @@ const options = [
{
key: 'runner_uid_min',
desc: 'Minimum uid to use for runner',
default: 1001,
default: 1000,
validators: []
},
{
@ -69,7 +69,7 @@ const options = [
{
key: 'runner_gid_min',
desc: 'Minimum gid to use for runner',
default: 1001,
default: 1000,
validators: []
},
{
@ -105,7 +105,7 @@ const options = [
{
key: 'repo_url',
desc: 'URL of repo index',
default: 'https://github.com/engineer-man/piston/releases/download/pkgs/index',
default: 'https://github.com',
validators: []
}
];

View File

@ -11,11 +11,10 @@ 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 $$@ -C $$< .
tar czf $$@ $$< --transform='s|$$<||'
endef
$(foreach pkg,$(PACKAGES),$(eval $(call PKG_RULE,$(pkg))))

View File

@ -18,4 +18,3 @@ make -j$(nproc)
make install -j$(nproc)
cd ../
rm -rf build

View File

@ -8,4 +8,4 @@ rm dart.zip
cp -r dart-sdk/* .
rm -rf dart-sdk
chmod -R +rx bin
chmod -R +rx bin

View File

@ -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

View File

@ -18,4 +18,3 @@ make -j$(nproc)
make install -j$(nproc)
cd ../
rm -rf build

View File

@ -23,4 +23,3 @@ make -j$(nproc)
make install -j$(nproc)
cd ../
rm -rf build obj

View File

@ -2,4 +2,3 @@
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

View File

@ -6,4 +6,3 @@ curl "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48e
tar xzf java.tar.gz --strip-components=1
rm java.tar.gz

View File

@ -9,4 +9,4 @@ cd build/jelly
../../bin/python3.9 setup.py install --optimize=1
cd ../../
rm -rf build
rm -rf build

View File

@ -3,4 +3,3 @@
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

View File

@ -7,4 +7,4 @@ unzip kotlin.zip
rm kotlin.zip
cp -r kotlinc/* .
rm -rf kotlinc
rm -rf kotlinc

View File

@ -17,4 +17,3 @@ make install -j$(nproc)
cd ../../
rm -rf build

View File

@ -18,4 +18,3 @@ make -j$(nproc)
make install -j$(nproc)
cd ../
rm -rf build

View File

@ -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

View File

@ -17,4 +17,4 @@ make -j$(nproc)
make install -j$(nproc)
cd ../../
rm -rf build
rm -rf build

View File

@ -18,4 +18,3 @@ cd ..
rm -rf build

View File

@ -17,4 +17,3 @@ make install -j$(nproc)
cd ..
rm -rf build

View File

@ -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

View File

@ -23,7 +23,7 @@ do
else
if [[ $BUILD -eq 1 ]]; then
echo "Building package $pkg"
make -j16 $pkg.pkg.tar.gz PLATFORM=docker-debian
make -j16 $pkg.pkg.tar.gz
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 PLATFORM=docker-debian
make -j16 $package.pkg.tar.gz
done
else