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

Add cloudcompiler.yaml #3048

Merged
merged 8 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from 7 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
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ jobs:
shell: bash
run: |
make build-wasmer
- name: Build Wasmer binary on Wasm32-WASI without LLVM
if: matrix.use_llvm != true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the right flag, we may need a new flag which is build_wasm

shell: bash
run: |
make build-wasmer-wasm
- name: Build Wapm binary
run: |
make build-wapm
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/cloudcompiler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Release cloudcompiler.wasm

env:
RUST_BACKTRACE: 1

on:
push:
tags:
# trigger action on release branch
- '[0-9]+.[0-9]+.[0-9]+*'
workflow_dispatch:

jobs:
setup:
name: Set up
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.59
target: ${{ matrix.target }}
- name: Install wasm32-wasi target
shell: bash
run: |
rustup target add wasm32-wasi
- name: Setup Wasmer
uses: wasmerio/setup-wasmer@v1
- name: Build cloudcompiler.wasm
shell: bash
run: |
make build-wasmer-wasm &&
mkdir target/wasm32-wasi/release/cloudcompiler
cp target/wasm32-wasi/release/wasmer-compiler.wasm target/wasm32-wasi/release/cloudcompiler/cloudcompiler.wasm &&
cat << EOF > target/wasm32-wasi/release/cloudcompiler/wapm.toml
[package]
name = "${{ secrets.WAPM_DEV_USERNAME }}/cloudcompiler"
version = "0.1.0"
description = "cloudcompiler.wasm"
license = "MIT"
repository = "https://github.com/wasmerio/wasmer"
[[module]]
name = "cloudcompiler"
source = "cloudcompiler.wasm"
abi = "wasi"
[module.interfaces]
wasi = "0.1.0-unstable"
[[command]]
name = "cloudcompiler"
module = "cloudcompiler"
EOF
- name: Fix wapm.toml version
run: |
echo $(git tag | tail -n1) > ./version.txt
v=$(git describe --tags --abbrev=0) && \
echo "version = ${v}" &&
sed -i "s/version = \".*\"/version = \"${v}\"/g" target/wasm32-wasi/release/cloudcompiler/wapm.toml \
- name: Build cloudcompiler.wasm
shell: bash
run: |
git tag &&
cat target/wasm32-wasi/release/cloudcompiler/wapm.toml &&
echo "ls" &&
ls target/wasm32-wasi/release/cloudcompiler
- name: Publish to WAPM
uses: wasmerio/wapm-publish@v1
with:
registry: https://registry.wapm.dev
directory: target/wasm32-wasi/release/cloudcompiler
username: ${{ secrets.WAPM_DEV_USERNAME }}
password: ${{ secrets.WAPM_DEV_PASSWORD }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C
### Added

### Changed
- [#3048](https://github.com/wasmerio/wasmer/pull/3048) Automatically publish wasmer as "cloudcompiler" package to wapm.dev on every release
- [#3075](https://github.com/wasmerio/wasmer/pull/3075) Remove __wbindgen_thread_id

### Fixed
Expand Down