Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update workflow to reflect what we have in wasmerio/wasmer#2003 #13

Merged
merged 1 commit into from
Feb 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 60 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./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:
Expand Down