Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
81722c2
Added build strategy defaults for JS
namesty Aug 22, 2023
41f464f
Added wrap/js as a language
namesty Aug 28, 2023
419e8a6
executable creation and tests set up
krisbitney Aug 31, 2023
921ef97
fixed bugs in executable cli
krisbitney Aug 31, 2023
0e16386
FIxed naming and giving typescript its own language definition
namesty Sep 1, 2023
0726fed
Merge remote-tracking branch 'origin/origin-dev' into namesty/wrap-js…
namesty Sep 1, 2023
97f13db
Added ts to bind language outputs
namesty Sep 1, 2023
49dbc58
moved executable CLI binaries to root/bin
krisbitney Sep 1, 2023
59c4ba4
removed redundant env variable declaration in yarn script
krisbitney Sep 1, 2023
bbf0f38
shortened names
krisbitney Sep 1, 2023
bf4dd65
added cli standalone package to CI; added cli standalone package to r…
krisbitney Sep 1, 2023
367f349
Image strategy working and building fine
namesty Sep 1, 2023
ac4c5ef
changed child process default cwd to process.cwd()
krisbitney Sep 1, 2023
faac1f7
Merge remote-tracking branch 'origin/origin-dev' into kris/polywrap-e…
krisbitney Sep 1, 2023
c5021fe
created prod CLI binaries
krisbitney Sep 1, 2023
6016bf9
CLI binaries are now added to github releases instead of being commit…
krisbitney Sep 1, 2023
50c6ac3
added ./bin back to gitignore
krisbitney Sep 1, 2023
894ee2a
moved cli vercel/pkg generation logic into script; adjusted names/dir…
krisbitney Sep 1, 2023
f0091e7
Merge pull request #1884 from polywrap/origin-0.11
dOrgJelli Sep 1, 2023
409e2b7
Merge pull request #1885 from polywrap/origin-0.11-dev
dOrgJelli Sep 1, 2023
574d9ed
refactor: unnecessary metadata from package.json
Niraj-Kamdar Sep 2, 2023
6c3acd0
fixes for cli binary CI and CD
krisbitney Sep 4, 2023
b6cf360
added fix for cli/js run-cli that is needed due to renaming of cli bi…
krisbitney Sep 4, 2023
c41c389
Merge pull request #1879 from polywrap/kris/polywrap-executable
dOrgJelli Sep 4, 2023
82369e8
Merge pull request #1886 from polywrap/nk/refactor-templates
dOrgJelli Sep 4, 2023
e165cd6
added draft CLI install script
krisbitney Sep 4, 2023
ad2c2e3
chore: explicit export serde bytes and bump msgpack serde version
cbrzn Sep 4, 2023
ea10982
Added template project + create command addition
namesty Sep 4, 2023
e072bb3
various fixes for CLI install script
krisbitney Sep 4, 2023
8a28933
Added build test cases
namesty Sep 4, 2023
3f2dde0
Edited local strategy skip reason
namesty Sep 4, 2023
b145447
more fixes for CLI script
krisbitney Sep 4, 2023
26521cf
adjusted install script ui text
krisbitney Sep 4, 2023
2d52599
chore: export everything from serde_bytes
cbrzn Sep 4, 2023
7e6f22c
Enabled VM build strategy + separated bindings language from build lang
namesty Sep 5, 2023
530e06e
Updated TS template to use VM strategy by default. Like the others
namesty Sep 5, 2023
25e4836
Fixed create spec
namesty Sep 5, 2023
1b174b6
Merge remote-tracking branch 'origin/origin-dev' into namesty/wrap-js…
namesty Sep 5, 2023
76909a8
bug fix in install script paths; added install script usage instructi…
krisbitney Sep 5, 2023
c796f08
Merge pull request #1887 from polywrap/chore/update-wasm-rs
dOrgJelli Sep 5, 2023
5cf3694
Moved buildable language definition + added comments for build strats
namesty Sep 6, 2023
dbe95c6
added windows text to readme
krisbitney Sep 6, 2023
08195b2
Changed bindings URI to Wrapscan URI
namesty Sep 6, 2023
3e60c84
Init VM image at version 0.0.1
namesty Sep 6, 2023
2661b89
Copying moduleFilePath in JS wrap strategies, instead of moduleDirs
namesty Sep 6, 2023
fc45feb
Lint fixes
namesty Sep 6, 2023
cfc739e
fix: various fixes in golang bindings such that wrap-test-harness passes
dOrgJelli Sep 7, 2023
25b8df5
chore: fix lint
dOrgJelli Sep 7, 2023
b2a2cb9
chore: fix bind tests
dOrgJelli Sep 7, 2023
285ad3b
Merge branch 'origin-dev' into namesty/wrap-ts-support
dOrgJelli Sep 7, 2023
195c1b4
Merge pull request #1889 from polywrap/cli-install-script
dOrgJelli Sep 7, 2023
c206ea9
Merge pull request #1891 from polywrap/wrap-golang-patches
dOrgJelli Sep 7, 2023
2ddc176
Merge branch 'origin-dev' into namesty/wrap-ts-support
dOrgJelli Sep 7, 2023
702862f
chore: fix polywrap cli install
dOrgJelli Sep 7, 2023
a57c816
removed unnecessary yarn scripts in packages/ci/package.json
krisbitney Sep 7, 2023
04f2071
chore: fix template tests
dOrgJelli Sep 7, 2023
7419b56
chore: add tests to wrap/typescript
dOrgJelli Sep 7, 2023
eaaf9cb
chore: fix lint
dOrgJelli Sep 7, 2023
be9085f
Merge pull request #1888 from polywrap/namesty/wrap-ts-support
dOrgJelli Sep 7, 2023
b97df52
Merge pull request #1892 from polywrap/cli-install-script
dOrgJelli Sep 7, 2023
46f8ee5
chore: migrate wraps.eth URIs to wrapscan.io
dOrgJelli Sep 7, 2023
e878cc0
chore: prep 0.11.4
dOrgJelli Sep 7, 2023
ab24ced
chore: set vm-base-js version to 0.1.0
dOrgJelli Sep 7, 2023
4827125
chore: adjust version
dOrgJelli Sep 7, 2023
7c2b4ac
Merge pull request #1894 from polywrap/deploy-vm-base-js
dOrgJelli Sep 7, 2023
ef140d2
chore: fix cd-containers workflow
dOrgJelli Sep 7, 2023
a5517ac
Merge pull request #1895 from polywrap/fix-cd-containers
dOrgJelli Sep 7, 2023
e2ac4a1
Merge pull request #1896 from polywrap/origin-dev
dOrgJelli Sep 7, 2023
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
12 changes: 12 additions & 0 deletions .github/workflows/cd-containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
echo IMAGE_RS_VM_DIR=./packages/cli/src/lib/defaults/build-strategies/wasm/rust/vm >> $GITHUB_ENV
echo IMAGE_AS_VM_DIR=./packages/cli/src/lib/defaults/build-strategies/wasm/assemblyscript/vm >> $GITHUB_ENV
echo IMAGE_GO_VM_DIR=./packages/cli/src/lib/defaults/build-strategies/wasm/golang/vm >> $GITHUB_ENV
echo IMAGE_JS_VM_DIR=./packages/cli/src/lib/defaults/build-strategies/wasm/javascript/vm >> $GITHUB_ENV

- name: Read Image VERSION & NAME into env.IMAGE_..._VERSION/NAME
run: |
Expand All @@ -52,12 +53,15 @@ jobs:
echo IMAGE_AS_VM_VERSION=$(cat $IMAGE_AS_VM_DIR/VERSION) >> $GITHUB_ENV
echo IMAGE_GO_VM_NAME=$(cat $IMAGE_GO_VM_DIR/NAME) >> $GITHUB_ENV
echo IMAGE_GO_VM_VERSION=$(cat $IMAGE_GO_VM_DIR/VERSION) >> $GITHUB_ENV
echo IMAGE_JS_VM_NAME=$(cat $IMAGE_JS_VM_DIR/NAME) >> $GITHUB_ENV
echo IMAGE_JS_VM_VERSION=$(cat $IMAGE_JS_VM_DIR/VERSION) >> $GITHUB_ENV

- name: Check if image tags already exist
run: |
echo IMAGE_RS_VM_UNPUBLISHED=$(! curl -s "https://hub.docker.com/v2/repositories/$IMAGE_RS_VM_NAME/tags/$IMAGE_RS_VM_VERSION" | grep -q "error 404" > /dev/null ; echo $?) >> $GITHUB_ENV
echo IMAGE_AS_VM_UNPUBLISHED=$(! curl -s "https://hub.docker.com/v2/repositories/$IMAGE_AS_VM_NAME/tags/$IMAGE_AS_VM_VERSION" | grep -q "error 404" > /dev/null ; echo $?) >> $GITHUB_ENV
echo IMAGE_GO_VM_UNPUBLISHED=$(! curl -s "https://hub.docker.com/v2/repositories/$IMAGE_GO_VM_NAME/tags/$IMAGE_GO_VM_VERSION" | grep -q "error 404" > /dev/null ; echo $?) >> $GITHUB_ENV
echo IMAGE_JS_VM_UNPUBLISHED=$(! curl -s "https://hub.docker.com/v2/repositories/$IMAGE_JS_VM_NAME/tags/$IMAGE_JS_VM_VERSION" | grep -q "error 404" > /dev/null ; echo $?) >> $GITHUB_ENV

- name: Build & Publish RS VM Image
if: env.IMAGE_RS_VM_UNPUBLISHED == '1'
Expand All @@ -82,3 +86,11 @@ jobs:
docker buildx create --use --name go-vm-builder
docker buildx build . --platform=linux/amd64,linux/arm64 -t $IMAGE_GO_VM_NAME:latest -t $IMAGE_GO_VM_NAME:$IMAGE_GO_VM_VERSION --output type=registry
docker buildx rm go-vm-builder

- name: Build & Publish JS VM Image
if: env.IMAGE_JS_VM_UNPUBLISHED == '1'
working-directory: ${{env.IMAGE_JS_VM_DIR}}
run: |
docker buildx create --use --name js-vm-builder
docker buildx build . --platform=linux/amd64,linux/arm64 -t $IMAGE_JS_VM_NAME:latest -t $IMAGE_JS_VM_NAME:$IMAGE_JS_VM_VERSION --output type=registry
docker buildx rm js-vm-builder
136 changes: 134 additions & 2 deletions .github/workflows/cd-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,106 @@ on:
types: [closed]

jobs:
Build-Binaries:
name: Build binaries
if: |
github.event.pull_request.user.login == 'polywrap-build-bot' &&
github.event.pull_request.merged == true
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x64
- arm64
node-version:
- node18
os:
- linux
- macos
- win
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.ref }}

- name: Read VERSION into env.RELEASE_VERSION
run: echo RELEASE_VERSION=$(cat VERSION) >> $GITHUB_ENV

- name: Is Pre-Release
run: |
STR="${RELEASE_VERSION}"
SUB='pre.'
if [[ "$STR" == *"$SUB"* ]]; then
echo PRE_RELEASE=true >> $GITHUB_ENV
else
echo PRE_RELEASE=false >> $GITHUB_ENV
fi

- name: Check If Tag Exists
id: tag_check
shell: bash -ex {0}
run: |
GET_API_URL="https://api.github.com/repos/${{github.repository}}/git/ref/tags/${{env.RELEASE_VERSION}}"
http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s \
-H "Authorization: token ${GITHUB_TOKEN}")
if [ "$http_status_code" -ne "404" ] ; then
echo TAG_EXISTS=true >> $GITHUB_ENV
else
echo TAG_EXISTS=false >> $GITHUB_ENV
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Read .nvmrc into env.NVMRC
if: env.TAG_EXISTS == 'false'
run: echo NVMRC=$(cat .nvmrc) >> $GITHUB_ENV

- name: Setup Node.js
if: env.TAG_EXISTS == 'false'
uses: actions/setup-node@v1
with:
node-version: '${{env.NVMRC}}'

- name: Install Rust
if: env.TAG_EXISTS == 'false'
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true

- name: Build CLI
if: env.TAG_EXISTS == 'false'
run: |
yarn install
yarn build

- name: Package into node binary
if: env.TAG_EXISTS == 'false'
uses: lando/pkg-action@v2
with:
entrypoint: ./packages/cli/bin/polywrap
config: ./packages/cli/package.json
options: --output ./packages/cli/standalone-binaries/${{ matrix.os }}-${{ matrix.arch }}/polywrap --compress Brotli
pkg: 5.8.1
upload: false
arch: ${{ matrix.arch }}
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}

- name: Upload Artifacts
if: env.TAG_EXISTS == 'false'
uses: actions/upload-artifact@v3
with:
name: cli-binary-${{ matrix.os }}-${{ matrix.arch }}
path: ${{ steps.pkg-action.outputs.file }}

Publish-GitHub:
name: Publish source to github.com
if: |
github.event.pull_request.user.login == 'polywrap-build-bot' &&
github.event.pull_request.merged == true
needs: Build-Binaries
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -62,20 +157,57 @@ jobs:
github_repo: ${{ github.repository }}
git_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}

- name: Download Artifacts linux-x64
uses: actions/download-artifact@v3
with:
name: cli-binary-linux-x64
path: ./bin/linux-x64/

- name: Download Artifacts linux-arm64
uses: actions/download-artifact@v3
with:
name: cli-binary-linux-arm64
path: ./bin/linux-arm64/

- name: Download Artifacts macos-x64
uses: actions/download-artifact@v3
with:
name: cli-binary-macos-x64
path: ./bin/macos-x64/

- name: Download Artifacts macos-arm64
uses: actions/download-artifact@v3
with:
name: cli-binary-macos-arm64
path: ./bin/macos-arm64/

- name: Download Artifacts win-x64
uses: actions/download-artifact@v3
with:
name: cli-binary-win-x64
path: ./bin/win-x64/

- name: Download Artifacts win-arm64
uses: actions/download-artifact@v3
with:
name: cli-binary-win-arm64
path: ./bin/win-arm64/

- name: Create Release
id: create_release
if: env.PRE_RELEASE == 'false' && env.TAG_EXISTS == 'false' && github.event.pull_request.merged == true
uses: actions/create-release@v1
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_VERSION }}
# Copy Pull Request's tile and body to Release Note
release_name: ${{ github.event.pull_request.title }}
name: ${{ github.event.pull_request.title }}
body: |
${{ github.event.pull_request.body }}
draft: false
prerelease: false
files: ./bin

- uses: actions/github-script@0.8.0
if: env.TAG_EXISTS == 'false'
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/ci-javascript.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,69 @@ jobs:
- name: Test CLI JS
run: yarn test
working-directory: ./packages/js/cli

Test-Cli-Standalone-Package:
runs-on: ubuntu-latest
needs: CI-WRAP-Test-Harness
if: ${{ always() }}
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm

- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- uses: actions/setup-go@v3
with:
go-version: '^1.13.1'

- name: Install cue lang
run: go install cuelang.org/go/cmd/cue@latest

- name: Check if cue is installed
run: cue version

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --nonInteractive --frozen-lockfile --prefer-offline

- name: Build
run: yarn build

- name: Get updated wrappers
if: ${{ needs.CI-WRAP-Test-Harness.outputs.rebuild_required == 'true' }}
uses: actions/download-artifact@v3
id: get-wrappers
with:
name: rebuilt-wrappers
path: ./wrappers

- if: ${{ needs.CI-WRAP-Test-Harness.outputs.rebuild_required == 'true' }}
run: |
rm -rf packages/test-cases/cases/wrappers
mv wrappers packages/test-cases/cases

- name: Build CLI standalone package for testing
run: yarn pkg . -t node18-linux-x64 --output ./standalone-binaries/polywrap-linux-x64
working-directory: ./packages/cli

- name: Test CLI standalone package
run: yarn test:pkg
working-directory: ./packages/cli
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# Polywrap Origin (0.11.4)
## Features
**`polywrap` CLI:**
* [PR-1888](https://github.com/polywrap/cli/pull/1888) **Build Wraps Using TypeScript**
* Create TypeScript wrap projects via `polywrap create wasm typescript my-wrap`
* [PR-1879](https://github.com/polywrap/cli/pull/1879) + [PR-1889](https://github.com/polywrap/cli/pull/1889) **Standalone Binary Installer**
* The `polywrap` CLI can now be installed via a standalone binary.
* An `install.sh` script can now be found at the root of the repository. Usage:
```bash
$ sh <(curl https://raw.githubusercontent.com/polywrap/cli/origin-dev/install.sh)

# Installs to `~/.polywrap`
# If polywrap is already installed, the script instead checks for updates
```

## Bugs
**`polywrap-wasm-rs`**
* [PR-1887](https://github.com/polywrap/cli/pull/1887) **Bump MsgPack Serde Version**

**`@polywrap/schema-bind`**
* [PR-1891](https://github.com/polywrap/cli/pull/1891) **Fix Various Golang -> Wrap Bindings**

# Polywrap Origin (0.11.3)
## Features
**`polywrap` CLI:**
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.3
0.11.4
Loading