From 9fb16ab99f8f80b4c1b47701c1aed1d769d0e86e Mon Sep 17 00:00:00 2001 From: jubianchi Date: Fri, 19 Feb 2021 22:13:55 +0100 Subject: [PATCH] chore: Update workflow to reflect what we have in wasmerio/wasmer#2003 --- .github/workflows/main.yaml | 66 +++++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ec435f8..5f2d4dd 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -40,11 +40,6 @@ jobs: rust: 1.49 llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/11.x/linux-amd64.tar.gz' artifact_name: 'wasmer-linux-amd64' - - build: linux-musl-x64 - os: ubuntu-18.04 - rust: 1.49 - target: x86_64-unknown-linux-musl - artifact_name: 'wasmer-linux-musl-amd64' - build: macos os: macos-latest rust: 1.49 @@ -188,8 +183,67 @@ jobs: MESSAGE_TEXT=$(printf '{"text":":fire: Build failed :fire:. %s"}' $ACTIONS_URL) curl -X POST -H 'Content-type: application/json' --data "$MESSAGE_TEXT" ${{ secrets.SLACK_WEBHOOK_URL }} + build-docker: + name: Build on ${{ matrix.build }} + runs-on: ubuntu-latest + needs: setup + strategy: + fail-fast: false + matrix: + include: + - build: linux-musl-x64 + image: alpine:latest + rust: 1.49 + artifact_name: 'wasmer-linux-musl-amd64' + steps: + - uses: actions/checkout@v2 + with: + repository: 'wasmerio/wasmer' + ref: 'master' + - uses: addnab/docker-run-action@v1 + with: + image: ${{ matrix.image }} + options: -v ${{ github.workspace }}:/work + run: | + set -e + + # Set up tools + apk add musl-dev curl make libtool libffi-dev gcc automake autoconf git + + # Install Rust ${{ matrix.rust }} + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh + sh ./rustup.sh -y + source ~/.cargo/env + rm -f ./rustup.sh + + # Set up Rust + rustup toolchain install ${{ matrix.rust }} + rustup default ${{ matrix.rust }} + + # Change working directory + cd /work + + # Build C API + make build-capi + + # Build Wasmer binary + make build-wasmer + + # Build Wapm binary + make build-wapm + + # Dist + make distribution + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.artifact_name }} + path: dist + if-no-files-found: error + retention-days: 1 + release: - needs: [setup, build] + needs: [setup, build, build-docker] runs-on: ubuntu-latest if: github.event == 'schedule' || github.ref == 'refs/heads/master' steps: