Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: WebAssembly/wasi-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c4515c4
Choose a base ref
...
head repository: WebAssembly/wasi-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d75e4a4
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Nov 26, 2019

  1. Switch to Github Actions CI (#82)

    * add github actions CI
    
    * delete azure pipelines CI
    Pat Hickey authored Nov 26, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ac571d0 View commit details

Commits on Nov 27, 2019

  1. Copy the full SHA
    d75e4a4 View commit details
Showing with 70 additions and 58 deletions.
  1. +0 −47 .azure-pipelines.yml
  2. +46 −0 .github/workflows/main.yml
  3. +5 −5 Makefile
  4. +9 −2 deb_from_installation.sh
  5. +10 −4 tar_from_installation.sh
47 changes: 0 additions & 47 deletions .azure-pipelines.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI
on: [push, pull_request]

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
# llvm 9 build is broken on windows for now. Re-enable this when it is fixed:
# - windows-latest
steps:
- uses: actions/checkout@master
with:
submodules: true
- run: |
# Windows releases of LLVM don't include the llvm-nm tool, which is needed for building
# wasi-libc. Rust's llvm-tools include llvm-nm, and Rust is installed on Azure's Windows
# images, so we can use that to make llvm-nm available without too much overhead.
rustup update stable
rustup default stable
rustup component add llvm-tools-preview
echo "::set-env name=WASM_NM::$(rustc --print sysroot|sed 's|C:|/c|'|sed 's|\\|/|g')/lib/rustlib/x86_64-pc-windows-msvc/bin/llvm-nm.exe"
shell: bash
name: Install llvm-nm (Windows)
if: matrix.os == 'windows-latest'
- run: choco install ninja
name: Install Ninja (Windows)
if: matrix.os == 'windows-latest'
- run: brew install ninja
name: Install Ninja (macOS)
if: matrix.os == 'macos-latest'
- run: sudo apt install ninja-build
name: Install Ninja (Linux)
if: matrix.os == 'ubuntu-latest'
- run: sudo make -j4 package
shell: bash
name: Build
- uses: actions/upload-artifact@v1
with:
name: ${{ format( 'packages-{0}.tgz', matrix.os) }}
path: dist
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -149,11 +149,11 @@ build: build/llvm.BUILT build/wasi-libc.BUILT build/compiler-rt.BUILT build/libc
strip: build/llvm.BUILT
cd $(PREFIX)/bin; strip clang-9 lld llvm-ar

package: build/package.BUILT
package: dist

build/package.BUILT: build strip
command -v dpkg-deb >/dev/null && ./deb_from_installation.sh || true
./tar_from_installation.sh
touch build/package.BUILT
dist: build strip
mkdir -p dist
command -v dpkg-deb >/dev/null && ./deb_from_installation.sh $(shell pwd)/dist || true
./tar_from_installation.sh $(shell pwd)/dist

.PHONY: default clean build strip package
11 changes: 9 additions & 2 deletions deb_from_installation.sh
Original file line number Diff line number Diff line change
@@ -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/build
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/
14 changes: 10 additions & 4 deletions tar_from_installation.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/usr/bin/env bash
set -ex
if [ -n "$1" ]; then
VERSION="$1"
OUTDIR=$1
else
OUTDIR=$PWD/build
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