Skip to content

Commit

Permalink
Merge branch 'master' into unwind-optional
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/compiler-singlepass/Cargo.toml
  • Loading branch information
syrusakbary committed May 11, 2021
2 parents 5dfdb14 + f2e9a57 commit 48139c3
Show file tree
Hide file tree
Showing 199 changed files with 54,907 additions and 5,190 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@ jobs:
include:
- build: linux
os: ubuntu-latest
rust: 1.47.0
env:
CARGO_SCCACHE_VERSION: 0.2.13
SCCACHE_AZURE_BLOB_CONTAINER: wasmerstoragesccacheblob
SCCACHE_AZURE_CONNECTION_STRING: ${{ secrets.SCCACHE_AZURE_CONNECTION_STRING }}
steps:
- uses: actions/checkout@v2
- name: Install Rust ${{ matrix.rust }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Configure cargo data directory
# After this point, all cargo registry and crate data is stored in
Expand All @@ -47,9 +45,9 @@ jobs:
target/*/.*
target/*/build
target/*/deps
key: ${{ matrix.os }}-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }}
key: ${{ matrix.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.rust }}-
${{ matrix.os }}
- name: Install LLVM (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.46.0
override: true
- name: Install LLVM (Linux)
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: "1.50"
override: true
- name: Install LLVM
shell: bash
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: "1.50"
override: true
components: rustfmt, clippy
- name: Install LLVM (Linux)
Expand Down
123 changes: 40 additions & 83 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,44 @@ jobs:
include:
- build: linux-x64
os: ubuntu-18.04
rust: "1.50"
llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/11.x/linux-amd64.tar.gz'
artifact_name: 'wasmer-linux-amd64'
cross_compilation_artifact_name: 'cross_compiled_from_linux'
run_integration_tests: true
use_sccache: true
- build: macos-x64
os: macos-latest
rust: "1.50"
llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/11.x/darwin-amd64.tar.gz'
artifact_name: 'wasmer-darwin-amd64'
cross_compilation_artifact_name: 'cross_compiled_from_mac'
run_integration_tests: true
use_sccache: true
- build: macos-arm64
os: macos-11.0
rust: "1.50"
target: aarch64-apple-darwin
artifact_name: 'wasmer-darwin-arm64'
use_sccache: true
- build: windows-x64
os: windows-latest
rust: "1.50"
# llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/11.x/windows-amd64.tar.gz'
artifact_name: 'wasmer-windows-amd64'
cross_compilation_artifact_name: 'cross_compiled_from_win'
run_integration_tests: true
- build: linux-aarch64
os: [self-hosted, linux, ARM64]
random_sccache_port: true
rust: "1.50"
llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/11.x/linux-aarch64.tar.gz'
artifact_name: 'wasmer-linux-aarch64'
run_integration_tests: false
use_sccache: true
#- build: linux-aarch64
# os: [self-hosted, linux, ARM64]
# random_sccache_port: true
# use_sccache: true
# llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/11.x/linux-aarch64.tar.gz'
# artifact_name: 'wasmer-linux-aarch64'
# run_integration_tests: false
- build: linux-musl-x64
os: ubuntu-latest
container: alpine:latest
artifact_name: 'wasmer-linux-musl-amd64'
run_integration_tests: true
use_sccache: false
container: ${{ matrix.container }}
env:
CARGO_SCCACHE_VERSION: 0.2.14-alpha.0-parity
SCCACHE_AZURE_BLOB_CONTAINER: wasmerstoragesccacheblob
Expand All @@ -85,12 +92,17 @@ jobs:
sudo apt-get update -y
sudo apt-get install -y --allow-downgrades libstdc++6=8.4.0-1ubuntu1~18.04
sudo apt-get install --reinstall g++-8
- name: Install Rust ${{ matrix.rust }}
- name: Set up base deps on musl
if: matrix.build == 'linux-musl-x64'
run: |
apk add musl-dev curl make libtool libffi-dev gcc automake autoconf git openssl-dev
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- uses: Swatinem/rust-cache@v1
if: matrix.use_sccache != true
- name: Install LLVM (Windows)
if: matrix.os == 'windows-latest' && !matrix.llvm_url
shell: cmd
Expand Down Expand Up @@ -126,13 +138,15 @@ jobs:
~/.cargo/git
key: ${{ matrix.build }}-${{ matrix.target }}-cargo-${{ hashFiles('Cargo.lock') }}-v1
- uses: actions/cache@v2
if: matrix.use_sccache
with:
path: ${{ runner.tool_cache }}/cargo-sccache
key: ${{ matrix.build }}-${{ matrix.target }}-sccache-bin-${{ env.CARGO_SCCACHE_VERSION }}-v1
- name: Install sccache
if: matrix.use_sccache
run: |
if [ ! -f '${{ runner.tool_cache }}/cargo-sccache/bin/sccache' ]; then
cargo install sccache --git https://github.com/paritytech/sccache.git --no-default-features --features=dist-client,azure --root '${{ runner.tool_cache }}/cargo-sccache'
cargo install sccache --git https://github.com/wasmerio/sccache.git --no-default-features --features=dist-client,azure --root '${{ runner.tool_cache }}/cargo-sccache'
fi
shell: bash
- name: Setup Rust target
Expand All @@ -143,6 +157,7 @@ jobs:
EOF
if: matrix.target
- name: Set sccache port
if: matrix.use_sccache && matrix.random_sccache_port
run: |
netstat -aln | awk '
$6 == "LISTEN" {
Expand All @@ -160,9 +175,9 @@ jobs:
' >> $GITHUB_ENV
# echo "SCCACHE_SERVER_PORT=9000"
echo "Setting random sccache port to: $SCCACHE_SERVER_PORT"
if: matrix.random_sccache_port
shell: bash
- name: Start sccache
if: matrix.use_sccache
run: |
chmod +x '${{ runner.tool_cache }}/cargo-sccache/bin/sccache'
'${{ runner.tool_cache }}/cargo-sccache/bin/sccache' --start-server
Expand Down Expand Up @@ -279,64 +294,6 @@ jobs:
if-no-files-found: error
retention-days: 1

test-docker:
name: Test on ${{ matrix.build }}
runs-on: ubuntu-latest
needs: setup
strategy:
fail-fast: false
matrix:
include:
- build: linux-musl-x64
image: alpine:latest
rust: "1.50"
artifact_name: 'wasmer-linux-musl-amd64'
steps:
- uses: actions/checkout@v2

- uses: addnab/docker-run-action@v3
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
# Test
make test test-capi
# Build C API, Wasmer & Wapm
make build-capi build-wasmer build-wapm
# Dist
make distribution
# Run integration tests
export WASMER_DIR=`pwd`/package
make test-integration
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifact_name }}
path: dist
if-no-files-found: error
retention-days: 1

test-cross-compile-on-linux:
name: Test cross-compile on linux
needs: [setup, test]
Expand Down Expand Up @@ -387,7 +344,7 @@ jobs:
# wasmer run artifacts/cross/cross_compiled_from_mac/win_from_mac.wjit -- --eval "function greet(name) { return JSON.stringify('Hello, ' + name); }; print(greet('World'));"

release:
needs: [setup, test, test-docker, test-cross-compile-on-linux, test-cross-compile-on-mac] #, test-cross-compile-on-win]
needs: [setup, test, test-cross-compile-on-linux, test-cross-compile-on-mac] #, test-cross-compile-on-win]
runs-on: ubuntu-latest
if: needs.setup.outputs.DOING_RELEASE == '1'
steps:
Expand Down Expand Up @@ -460,15 +417,15 @@ jobs:
asset_path: artifacts/wasmer-darwin-arm64/wasmer.tar.gz
asset_name: wasmer-darwin-arm64.tar.gz
asset_content_type: application/gzip
- name: Upload Release Asset Linux aarch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/wasmer-linux-aarch64/wasmer.tar.gz
asset_name: wasmer-linux-aarch64.tar.gz
asset_content_type: application/gzip
#- name: Upload Release Asset Linux aarch64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: artifacts/wasmer-linux-aarch64/wasmer.tar.gz
# asset_name: wasmer-linux-aarch64.tar.gz
# asset_content_type: application/gzip

audit:
name: Audit
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C
## **[Unreleased]**

### Added
- [#2296](https://github.com/wasmerio/wasmer/pull/2296) Add support for the bulk memory proposal in compiler Singlepass and compiler LLVM.
- [#2208](https://github.com/wasmerio/wasmer/pull/2208) Add a new CHANGELOG.md specific to our C API to make it easier for users primarily consuming our C API to keep up to date with changes that affect them.
- [#2103](https://github.com/wasmerio/wasmer/pull/2103) Add middleware (incl. metering) in the C API.
- [#2003](https://github.com/wasmerio/wasmer/pull/2003) Wasmer works with musl, and is built, tested and packaged for musl.
Expand All @@ -21,6 +22,9 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C
- [#2135](https://github.com/wasmerio/wasmer/pull/2135) [Documentation](./PACKAGING.md) for linux distribution maintainers

### Changed
- [#2299](https://github.com/wasmerio/wasmer/pull/2299) Unused trap codes (due to Wasm spec changes), `HeapSetterOutOfBounds` and `TableSetterOutOfBounds` were removed from `wasmer_vm::TrapCode` and the numbering of the remaining variants has been adjusted.
- [#2293](https://github.com/wasmerio/wasmer/pull/2293) The `Memory::ty` trait method now returns `MemoryType` by value. `wasmer_vm::LinearMemory` now recomputes `MemoryType`'s `minimum` field when accessing its type. This behavior is what's expected by the latest spectests. `wasmer::Memory::ty` has also been updated to follow suit, it now returns `MemoryType` by value.
- [#2251](https://github.com/wasmerio/wasmer/pull/2251) Wasmer CLI will now execute WASI modules with multiple WASI namespaces in them by default. Use `--allow-multiple-wasi-versions` to suppress the warning and use `--deny-multiple-wasi-versions` to make it an error.
- [#2201](https://github.com/wasmerio/wasmer/pull/2201) Implement `loupe::MemoryUsage` for `wasmer::Instance`.
- [#2200](https://github.com/wasmerio/wasmer/pull/2200) Implement `loupe::MemoryUsage` for `wasmer::Module`.
- [#2199](https://github.com/wasmerio/wasmer/pull/2199) Implement `loupe::MemoryUsage` for `wasmer::Store`.
Expand Down
Loading

0 comments on commit 48139c3

Please sign in to comment.