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

bindings init #4

Merged
merged 41 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
48537b3
added detect_keyword, is_keyword, and to_typescript to typescript plu…
krisbitney Jun 14, 2023
b6a74ec
typescript plugin bindings passing sanity test case
krisbitney Jun 15, 2023
eff1a94
fixed "capabilities" bug in all templates
krisbitney Jun 15, 2023
63e3405
app-typescript passing sanity test case
krisbitney Jun 15, 2023
2a867dd
wasm assemblyscript bindings almost done
krisbitney Jun 16, 2023
c124bf8
wasm assemblyscript bindings bug fixes
krisbitney Jun 19, 2023
9009c6e
wasm assemblyscript bindings passing sanity test
krisbitney Jun 19, 2023
a5e42fb
added rust plugin helpers
krisbitney Jun 19, 2023
d525467
rust plugin bindings passing sanity test case
krisbitney Jun 20, 2023
d7d7a92
added kotlin plugin templates
krisbitney Jun 20, 2023
77602ba
added kotlin helpers
krisbitney Jun 20, 2023
a0c3a3a
kotlin plugin bindings passing sanity test case (except abi bytes dif…
krisbitney Jun 20, 2023
cc54c96
added python plugin helpers
krisbitney Jun 20, 2023
50b98c1
python plugin bindings passing sanity test
krisbitney Jun 21, 2023
bfab978
adjusted deserialize_properties spacing in assemblyscript wasm bindings
krisbitney Jun 21, 2023
e5af9a0
prepared wrap-rust folder so just need templates
krisbitney Jun 21, 2023
0dd585f
fixed kotlin template file names
krisbitney Jun 21, 2023
d6f6d9b
wip: add ci/cd
Niraj-Kamdar Jun 21, 2023
bb33b44
feat: add workflows for wrappers
Niraj-Kamdar Jun 23, 2023
1f297dd
Merge pull request #2 from polywrap/nk/ci-cd
Niraj-Kamdar Jun 23, 2023
21a5a68
fix for methods without args
krisbitney Jun 26, 2023
7749cf3
fix for envs without args
krisbitney Jun 26, 2023
2ba9c03
fix: workflows
Niraj-Kamdar Jun 27, 2023
f3bd882
Merge pull request #3 from polywrap/nk/ci-cd
Niraj-Kamdar Jun 27, 2023
878b564
fix: build interface before impls
Niraj-Kamdar Jun 27, 2023
9b5f2c0
fix: issues in interface package.json
Niraj-Kamdar Jun 27, 2023
7f97085
fix: invalid workflow error
Niraj-Kamdar Jun 27, 2023
8b5cfae
fix: issues
Niraj-Kamdar Jun 27, 2023
8d57102
fix for envs without args in kotlin plugin bindings
krisbitney Jun 27, 2023
eddeb6f
update Uri type in kotlin plugin bindings
krisbitney Jun 28, 2023
41ccd53
kotlin plugin bindings test to skip manifest comparison
krisbitney Jun 28, 2023
b126a55
removed rust bindings from this branch so that only working bindings …
krisbitney Jun 28, 2023
d791552
added bindings build artifacts and deployment URIs to git
krisbitney Jun 28, 2023
49d2b47
added CD workflow
krisbitney Jun 28, 2023
a18249a
updated yarn lock files
krisbitney Jun 28, 2023
46ad75c
removed CD workflow - doesn't work
krisbitney Jun 28, 2023
ca59015
added CD workflow that creates new PRs for deployment artifact updates
krisbitney Jun 28, 2023
d39c854
added branch cleanup for CD PRs
krisbitney Jun 28, 2023
66ddd7f
updated ci/cd to use nvmrc from impl dirs
krisbitney Jun 28, 2023
043418a
improved error message in to_upper
krisbitney Jun 29, 2023
a5bee19
reverted accidentally deleted lines of code in kotlin-plugin to_upper.rs
krisbitney Jun 29, 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
32 changes: 32 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Default
* @dOrgJelli @krisbitney

# Interface
interface @krisbitney

# Typescript App Binding
implementations/app-typescript @krisbitney @Niraj-Kamdar @nerfZael @cbrzn

# Python App Binding
implementations/app-python @Niraj-Kamdar

# Rust App Binding
implementations/app-rust @namesty @cbrzn

# Kotlin Plugin Binding
implementations/plugin-kotlin @krisbitney

# Typescript Plugin Binding
implementations/plugin-typescript @krisbitney @Niraj-Kamdar @nerfZael @cbrzn

# Python Plugin Binding
implementations/plugin-python @Niraj-Kamdar

# Rust Plugin Binding
implementations/plugin-rust @namesty @cbrzn

# Assemblyscript Wrap Binding
implementations/wrap-typescript @dOrgJelli @krisbitney @nerfZael @Niraj-Kamdar

# Rust Wrap Binding
implementations/wrap-rust @dOrgJelli @krisbitney @nerfZael @Niraj-Kamdar @cbrzn
16 changes: 16 additions & 0 deletions .github/workflows/artifact_cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Delete branch after artifact PR close
on:
pull_request:
types:
- closed

jobs:
cleanup:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'github-actions[bot]' && startsWith(github.event.pull_request.head.ref, 'artifacts_')
steps:
- name: Delete branch
uses: dawidd6/action-delete-branch@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.event.pull_request.head.ref }}
132 changes: 132 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: CD
on:
pull_request:
types: [closed]
branches:
- main

jobs:
interface:
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
working-directory: ./interface
steps:
- name: Checkout
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 }}'

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

- name: Build
run: yarn build

- name: Deploy
run: yarn deploy

- name: Check for changes in URI.txt
run: |
git diff --name-only | grep ^URI.txt$
echo "changed=$?" >> $GITHUB_ENV

- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Add deployments" -a
if: env.changed == 0

- name: Push changes
run: |
git branch -c main artifacts_interface_${{ github.run_id }}
git push origin artifacts_interface_${{ github.run_id }}
if: env.changed == 0

- name: Create PR
run: |
gh pr create --title "New deployment artifacts" --body "" --base main --head artifacts_interface_${{ github.run_id }}
if: env.changed == 0

getImplementations:
runs-on: ubuntu-latest
outputs:
matrix: ${{ env.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- id: set-matrix
run: echo "matrix=$(./scripts/getImplementations.sh)" >> $GITHUB_ENV

implementations-cd:
runs-on: ubuntu-latest
needs:
- interface
- getImplementations
strategy:
matrix: ${{fromJSON(needs.getImplementations.outputs.matrix)}}
defaults:
run:
working-directory: ./implementations/${{ matrix.package }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
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 }}'

- name: Install dependencies
run: yarn install --nonInteractive --frozen-lockfile --prefer-offline
working-directory: ./interface
krisbitney marked this conversation as resolved.
Show resolved Hide resolved

- name: Build
run: yarn build
working-directory: ./interface

- name: Build
run: yarn build

- name: Deploy
run: yarn deploy

- name: Check for changes in URI.txt
run: |
git diff --name-only | grep ^URI.txt$
echo "changed=$?" >> $GITHUB_ENV

- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Add deployments" -a
if: env.changed == 0

- name: Push changes
run: |
git branch -c main artifacts_${{ matrix.package }}_${{ github.run_id }}
git push origin artifacts_${{ matrix.package }}_${{ github.run_id }}
if: env.changed == 0

- name: Create PR
run: |
gh pr create --title "New deployment artifacts" --body "" --base main --head artifacts_${{ matrix.package }}_${{ github.run_id }}
if: env.changed == 0
82 changes: 82 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: CI
on:
push:
branches:
- main
pull_request:

jobs:
interface:
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
working-directory: ./interface
steps:
- name: Checkout
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 }}'

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

- name: Build
run: yarn build

getImplementations:
runs-on: ubuntu-latest
outputs:
matrix: ${{ env.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- id: set-matrix
run: echo "matrix=$(./scripts/getImplementations.sh)" >> $GITHUB_ENV

implementations-ci:
runs-on: ubuntu-latest
needs:
- interface
- getImplementations
strategy:
matrix: ${{fromJSON(needs.getImplementations.outputs.matrix)}}
defaults:
run:
working-directory: ./implementations/${{ matrix.package }}
steps:
- name: Checkout
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 }}'

- name: Install dependencies
run: yarn install --nonInteractive --frozen-lockfile --prefer-offline
working-directory: ./interface

- name: Build
run: yarn build
working-directory: ./interface
krisbitney marked this conversation as resolved.
Show resolved Hide resolved

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

- name: Build
run: yarn build

- name: Test
run: yarn test
Loading