Skip to content

Commit 8885f03

Browse files
authored
Merge pull request #1906 from polywrap/origin-0.12-dev
Prep Origin 0.12 | /workflows/release-pr
2 parents 722258c + 7076346 commit 8885f03

8 files changed

Lines changed: 75 additions & 24 deletions

File tree

.github/workflows/cd-source.yaml

Lines changed: 60 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,57 @@ jobs:
8080
yarn build
8181
8282
- name: Package into standalone binary
83-
if: env.TAG_EXISTS == 'false'
83+
if: env.TAG_EXISTS == 'false' && startsWith(matrix.arch, 'arm64')
84+
uses: uraimo/run-on-arch-action@v2
85+
with:
86+
arch: aarch64
87+
distro: ubuntu18.04
88+
githubToken: ${{ secrets.GITHUB_TOKEN }}
89+
install: |
90+
apt update && apt -y install curl
91+
curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
92+
apt-get install -y nodejs
93+
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
94+
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
95+
apt update && apt -y install yarn
96+
yarn global add pkg@5.8.1 --prefix /usr/local
97+
pkg --version
98+
run: |
99+
pkg \
100+
--config ./packages/cli/package.json \
101+
--target=${{ matrix.node-version }}-${{ matrix.os }}-${{ matrix.arch }} \
102+
--output ./packages/cli/standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} \
103+
--debug \
104+
--compress Brotli \
105+
./packages/cli/bin/polywrap
106+
107+
- name: Package into standalone binary
108+
if: env.TAG_EXISTS == 'false' && startsWith(matrix.arch, 'x64')
84109
working-directory: ./packages/cli
85110
run: |
86-
npx pkg --config ./package.json --target=${{ matrix.node-version }}-${{ matrix.os }}-${{ matrix.arch }} --output ./standalone-binaries/${{ matrix.os }}-${{ matrix.arch }}/polywrap --compress Brotli ./bin/polywrap
111+
npx pkg \
112+
--config ./package.json \
113+
--target=${{ matrix.node-version }}-${{ matrix.os }}-${{ matrix.arch }} \
114+
--output ./standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} \
115+
--compress Brotli \
116+
./bin/polywrap
87117
88118
- name: Extract binary path
89119
if: env.TAG_EXISTS == 'false'
90-
run: echo STANDALONE_BINARY_PATH=$(stat ./packages/cli/standalone-binaries/${{ matrix.os }}-${{ matrix.arch }}/polywrap* | awk '/File:/ {print $2}') >> $GITHUB_ENV
120+
run: |
121+
if [[ "${{ matrix.os }}" == "win" ]]; then
122+
FILE_NAME="polywrap-${{ matrix.os }}-${{ matrix.arch }}.exe"
123+
else
124+
FILE_NAME="polywrap-${{ matrix.os }}-${{ matrix.arch }}"
125+
fi
126+
echo STANDALONE_BINARY_PATH=$(stat ./packages/cli/standalone-binaries/$FILE_NAME | awk '/File:/ {print $2}') >> $GITHUB_ENV
127+
echo FILE_NAME=$FILE_NAME >> $GITHUB_ENV
91128
92129
- name: Upload Artifacts
93130
if: env.TAG_EXISTS == 'false'
94131
uses: actions/upload-artifact@v3
95132
with:
96-
name: cli-binary-${{ matrix.os }}-${{ matrix.arch }}
133+
name: ${{ env.FILE_NAME }}
97134
path: ${{ env.STANDALONE_BINARY_PATH }}
98135

99136
Publish-GitHub:
@@ -157,38 +194,38 @@ jobs:
157194
- name: Download Artifacts linux-x64
158195
uses: actions/download-artifact@v3
159196
with:
160-
name: cli-binary-linux-x64
161-
path: ./bin/linux-x64/
197+
name: polywrap-linux-x64
198+
path: ./bin
162199

163200
- name: Download Artifacts linux-arm64
164201
uses: actions/download-artifact@v3
165202
with:
166-
name: cli-binary-linux-arm64
167-
path: ./bin/linux-arm64/
203+
name: polywrap-linux-arm64
204+
path: ./bin
168205

169206
- name: Download Artifacts macos-x64
170207
uses: actions/download-artifact@v3
171208
with:
172-
name: cli-binary-macos-x64
173-
path: ./bin/macos-x64/
209+
name: polywrap-macos-x64
210+
path: ./bin
174211

175212
- name: Download Artifacts macos-arm64
176213
uses: actions/download-artifact@v3
177214
with:
178-
name: cli-binary-macos-arm64
179-
path: ./bin/macos-arm64/
215+
name: polywrap-macos-arm64
216+
path: ./bin
180217

181218
- name: Download Artifacts win-x64
182219
uses: actions/download-artifact@v3
183220
with:
184-
name: cli-binary-win-x64
185-
path: ./bin/win-x64/
221+
name: polywrap-win-x64.exe
222+
path: ./bin
186223

187224
- name: Download Artifacts win-arm64
188225
uses: actions/download-artifact@v3
189226
with:
190-
name: cli-binary-win-arm64
191-
path: ./bin/win-arm64/
227+
name: polywrap-win-arm64.exe
228+
path: ./bin
192229

193230
- name: Create Release
194231
id: create_release
@@ -204,7 +241,13 @@ jobs:
204241
${{ github.event.pull_request.body }}
205242
draft: false
206243
prerelease: false
207-
files: ./bin
244+
files: |
245+
./bin/polywrap-linux-x64
246+
./bin/polywrap-linux-arm64
247+
./bin/polywrap-macos-x64
248+
./bin/polywrap-macos-arm64
249+
./bin/polywrap-win-x64.exe
250+
./bin/polywrap-win-arm64.exe
208251
209252
- uses: actions/github-script@0.8.0
210253
if: env.TAG_EXISTS == 'false'

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# Polywrap Origin (0.12.0)
2+
## Breaking Changes
3+
**`@polywrap/schema-bind`:**
4+
* [PR-1890](https://github.com/polywrap/cli/pull/1890) **Update `wasm/rust` Bindings to `v2`**
5+
6+
## Bugs
7+
**`polywrap` CLI:**
8+
* [PR-1903](https://github.com/polywrap/cli/pull/1903) **Properly Publish Binary Release**
9+
110
# Polywrap Origin (0.11.4)
211
## Features
312
**`polywrap` CLI:**

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.11.4
1+
0.12.0

WRAP_TEST_HARNESS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
master
1+
kris/test-wrap-rust-2

packages/schema/bind/src/bindings/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function getGenerateBindingFn(
1717
);
1818
case "wrap-rs":
1919
return WrapBindgen.getGenerateBindingFn(
20-
"wrapscan.io/polywrap/wrap-rust-abi-bindgen@1"
20+
"wrapscan.io/polywrap/wrap-rust-abi-bindgen@2"
2121
);
2222
case "wrap-go":
2323
return Golang.Wasm.generateBinding;

packages/templates/wasm/rust/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pub mod wrap;
2-
pub use wrap::*;
2+
pub use wrap::prelude::*;
33

44
impl ModuleTrait for Module {
55
fn sample_method(args: ArgsSampleMethod) -> Result<SampleResult, String> {

packages/test-cases/cases/cli/build-cmd/wasm/rust/001-sanity/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ edition = "2021"
1212

1313
[dependencies]
1414
polywrap-wasm-rs = { path = "../../../../../../../wasm/rs" }
15-
polywrap_msgpack_serde = "~0.0.2-beta.5"
1615
serde = { version = "1.0", features = ["derive"] }
1716

1817
[lib]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
pub mod wrap;
2-
pub use wrap::*;
2+
pub use wrap::prelude::*;
33

44
impl ModuleTrait for Module {
5-
fn method(args: wrap::module::ArgsMethod) -> Result<String, String> {
5+
fn method(args: ArgsMethod) -> Result<String, String> {
66
Ok(args.arg)
77
}
88
}

0 commit comments

Comments
 (0)