diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1dd4b5a..11db832 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -167,8 +167,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: