Compare commits

...

22 Commits

Author SHA1 Message Date
Thomas Hobson 90bc5848a1
pkg(deno-1.7.5): bump ci 2021-03-15 22:55:59 +13:00
Thomas Hobson 4a9ad97645
pkg(Makefile): update to strip dir properly 2021-03-15 22:55:42 +13:00
Thomas Hobson c5938dfd40
pkg(deno-1.7.5): ci bump 2021-03-15 22:40:51 +13:00
Thomas Hobson 8c6552d19e
api: start at user 1001 by default 2021-03-15 22:08:37 +13:00
Thomas Hobson 8b70b7d82e
api: update default repo url 2021-03-15 19:39:55 +13:00
Thomas Hobson 27598b236c
pkg: bump remaining packages 2021-03-15 19:38:57 +13:00
Thomas Hobson 92899bd880
pkg(bash-5.1.0): ci bump 2021-03-15 19:34:51 +13:00
Thomas Hobson 0493bcec31
ci(package): run curl once per line 2021-03-15 19:34:38 +13:00
Thomas Hobson fd8e25608f
pkg: bump all binary download packages 2021-03-15 19:24:59 +13:00
Thomas Hobson 92a0b13ba7
ci(release): merge with push 2021-03-15 19:18:01 +13:00
Thomas Hobson 9c2f562e01
repo: build with correct platform 2021-03-15 19:16:38 +13:00
Thomas Hobson b02fe3eefb
ci(release): use latest release always 2021-03-15 19:14:02 +13:00
Thomas Hobson 53841e0d50
ci(release): remove section from name 2021-03-15 19:03:02 +13:00
Thomas Hobson e070c87322
ci(release): manual dispatch 2021-03-15 18:59:06 +13:00
Thomas Hobson b9d4ca94df
ci(release): add name to job 2021-03-15 18:57:35 +13:00
Thomas Hobson 4c7ec9689e
ci(release): remove filters 2021-03-15 18:56:32 +13:00
Thomas Hobson 3c5336e516
ci(release): use key types not type 2021-03-15 18:54:12 +13:00
Thomas Hobson 49687d4a28
ci(release): name workflow 2021-03-15 18:53:24 +13:00
Thomas Hobson 9589948ea7
pkg(deno-1.7.5): Give correct extension for CI testing 2021-03-15 18:49:09 +13:00
Thomas Hobson 7be0ca1626
ci(release): create index on release edit 2021-03-15 18:48:01 +13:00
Thomas Hobson 7d7b83e951
pkg(bash-5.1.0): add correct file extension 2021-03-15 18:30:34 +13:00
Thomas Hobson 11f415248d
ci(package): automatically build and upload 2021-03-15 18:29:40 +13:00
23 changed files with 101 additions and 14 deletions

76
.github/workflows/package-push.yaml vendored Normal file
View File

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

View File

@ -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: []
}
];

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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