Github Actions uploads built artifacts (#83)

* build: put artifacts into dist/. workflow: upload contents of dist/.

* review feedback

* CI workflow: add comment explaining artifact name

* checkout action to v1

* typo fix
pull/88/head
Pat Hickey 6 years ago committed by GitHub
parent baa9b684ee
commit 2bfea0cc96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -40,3 +40,8 @@ jobs:
- run: sudo make -j4 package
shell: bash
name: Build
- uses: actions/upload-artifact@v1
with:
# Upload the dist folder. Give it a name according to the OS it was built for.
name: ${{ format( 'dist-{0}.tgz', matrix.os) }}
path: dist

@ -152,8 +152,9 @@ strip: build/llvm.BUILT
package: build/package.BUILT
build/package.BUILT: build strip
command -v dpkg-deb >/dev/null && ./deb_from_installation.sh || true
./tar_from_installation.sh
mkdir -p dist
command -v dpkg-deb >/dev/null && ./deb_from_installation.sh $(shell pwd)/dist || true
./tar_from_installation.sh $(shell pwd)/dist
touch build/package.BUILT
.PHONY: default clean build strip package

@ -1,9 +1,15 @@
#!/usr/bin/env sh
set -ex
if [ -n "$1" ]; then
export VERSION="$1"
OUTDIR=$1
else
export VERSION=`./version.sh`
OUTDIR=$PWD/dist
fi
if [ -n "$2" ]; then
VERSION="$2"
else
VERSION=`./version.sh`
fi
rm -rf build/pkg
@ -12,3 +18,4 @@ mkdir -p build/pkg/DEBIAN
sed -e s/VERSION/$VERSION/ wasi-sdk.control > build/pkg/DEBIAN/control
cp -R /opt/wasi-sdk build/pkg/opt/
cd build && dpkg-deb -b pkg wasi-sdk_$VERSION\_amd64.deb
mv build/wasi-sdk_$VERSION\amd64.deb $OUTDIR/

@ -1,7 +1,13 @@
#!/usr/bin/env bash
set -ex
if [ -n "$1" ]; then
VERSION="$1"
OUTDIR=$1
else
OUTDIR=$PWD/dist
fi
if [ -n "$2" ]; then
VERSION="$2"
else
VERSION=`./version.sh`
fi
@ -19,10 +25,10 @@ esac
rm -rf $PKGDIR
cp -R /opt/wasi-sdk $PKGDIR
cd build
tar czf wasi-sdk-$VERSION\-$MACHINE.tar.gz wasi-sdk-$VERSION
tar czf $OUTDIR/wasi-sdk-$VERSION\-$MACHINE.tar.gz wasi-sdk-$VERSION
# As well as the full SDK package, also create archives of libclang_rt.builtins
# and the sysroot. These are made available for users who have an existing clang
# installation.
tar czf libclang_rt.builtins-wasm32-wasi-$VERSION.tar.gz -C compiler-rt lib/wasi
tar czf wasi-sysroot-$VERSION.tar.gz -C wasi-sdk-$VERSION/share wasi-sysroot
tar czf $OUTDIR/libclang_rt.builtins-wasm32-wasi-$VERSION.tar.gz -C compiler-rt lib/wasi
tar czf $OUTDIR/wasi-sysroot-$VERSION.tar.gz -C wasi-sdk-$VERSION/share wasi-sysroot

Loading…
Cancel
Save