Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
149 changes: 149 additions & 0 deletions .github/workflows/provider-couchbase.yml
Comment thread
brooksmtownsend marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: provider-couchbase

on:
push:
tags:
- 'provider-couchbase-v[0-9].[0-9]+.[0-9]+'
pull_request:
paths:
- '.github/workflows/provider-couchbase.yml'
- 'providers/couchbase/**'

env:
working_directory: providers/couchbase
permissions:
contents: read

jobs:
build:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- os: linux
arch: amd64
bin: linux_amd64.bin
- os: linux
arch: arm64
bin: linux_arm64.bin
- os: darwin
arch: amd64
bin: darwin_amd64.bin
- os: darwin
arch: arm64
bin: darwin_arm64.bin
- os: windows
arch: amd64
bin: windows_amd64.exe

steps:
# Checkout the repository with submodules
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive

# Set up Go environment
- name: Set up Go
uses: actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639 # v4.2.1
with:
go-version: '1.24'

# Install dependencies
- name: Install dependencies
working-directory: ${{ env.working_directory }}
run: go mod tidy

# Build Go binaries for multiple platforms
- name: Build binary ${{ matrix.platform.os }}_${{ matrix.platform.arch }}
env:
GOOS: ${{ matrix.platform.os }}
GOARCH: ${{ matrix.platform.arch }}
working-directory: ${{ env.working_directory }}
run: |
echo "Building for $GOOS/$GOARCH to ${{ matrix.platform.bin }}"
go build -o ${{ matrix.platform.bin }}
- name: Upload binary
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ matrix.platform.os }}_${{ matrix.platform.arch }}
path: ${{ env.working_directory }}/${{ matrix.platform.bin }}

archive:
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
# Install wash
- uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2.49.49
with:
tool: wash
- name: Install wit-bindgen-wrpc
run: |
curl -fLO https://github.com/bytecodealliance/wrpc/releases/download/v0.14.0/wit-bindgen-wrpc-x86_64-unknown-linux-musl
chmod +x wit-bindgen-wrpc-x86_64-unknown-linux-musl
sudo mv wit-bindgen-wrpc-x86_64-unknown-linux-musl /usr/local/bin/wit-bindgen-wrpc
- name: Download binary
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: ${{ env.working_directory }}/bin
- name: Set version
if: github.event_name == 'pull_request'
run: echo "VERSION=canary" >> $GITHUB_ENV
- name: Set version
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
run: |
echo "VERSION=${GITHUB_REF_NAME#provider-couchbase-v}" >> $GITHUB_ENV
# Create provider archive
- name: Provider archive
working-directory: ${{ env.working_directory }}
env:
WASH_ISSUER_KEY: ${{ secrets.WASMCLOUD_ACCOUNT_OFFICIAL }}
WASH_SUBJECT_KEY: ${{ secrets.WASMCLOUD_COUCHBASE }}
run: |
wash par create \
--binary "./bin/linux_amd64/linux_amd64.bin" \
--compress \
--destination "couchbase.par.gz" \
--name "couchbase-provider" \
--vendor "wasmcloud" \
--wit-directory ./wit \
--version "${VERSION}"
wash par insert \
--arch aarch64-linux \
--binary "./bin/linux_arm64/linux_arm64.bin" \
couchbase.par.gz
wash par insert \
--arch aarch64-macos \
--binary "./bin/darwin_arm64/darwin_arm64.bin" \
couchbase.par.gz
wash par insert \
--arch x86_64-macos \
--binary "./bin/darwin_amd64/darwin_amd64.bin" \
couchbase.par.gz
wash par insert \
--arch x86_64-windows \
--binary "./bin/windows_amd64/windows_amd64.exe" \
couchbase.par.gz
wash par inspect couchbase.par.gz
- name: Upload provider archive
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: couchbase-provider-archive
path: ${{ env.working_directory }}/couchbase.par.gz
Comment on lines +137 to +141
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this intended for debugging Canary builds since canaries aren't pushed to ghcr?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep that's right, just in case you want to download the par.gz from your specific PR action or something

- name: Push provider archive
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
env:
WASH_REG_USER: wasmCloud
WASH_REG_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
wash push ghcr.io/wasmcloud/contrib/providers/couchbase:$VERSION \
${{ env.working_directory }}/couchbase.par.gz \
61 changes: 61 additions & 0 deletions .github/workflows/wit-wasmcloud-couchbase.yml
Comment thread
brooksmtownsend marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: wit-wasmcloud-couchbase

on:
push:
tags:
- 'wit-wasmcloud-couchbase-v[0-9].[0-9]+.[0-9]+'
pull_request:
paths:
- '.github/workflows/wit-wasmcloud-couchbase.yml'
- 'providers/couchbase/wit'

env:
working_directory: providers/couchbase
permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
- uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2.49.49
with:
tool: wash
- uses: wasmcloud/wasmcloud/.github/actions/configure-wkg@4687e1a23f07f1b2b7cc917dad1dc3e7df5106cf
with:
oci-username: ${{ github.repository_owner }}
oci-password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
working-directory: ${{ env.working_directory }}
run: wash wit build -f package.wasm
# From here on, only run for tagged releases
- name: Push version-tagged WebAssembly binary to GHCR
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
working-directory: ${{ env.working_directory }}
run: wash wit publish package.wasm
- name: Extract tag context
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
id: ctx
run: |
version=${GITHUB_REF_NAME#wit-wasmcloud-couchbase-v}
echo "version=${version}" >> "$GITHUB_OUTPUT"
echo "tarball=wit-wasmcloud-couchbase-${version}.tar.gz" >> "$GITHUB_OUTPUT"
echo "version is ${version}"
- name: Package tarball for release
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
working-directory: ${{ env.working_directory }}
run: |
tar -cvzf ${{ steps.ctx.outputs.tarball }} wit
- name: Release
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
with:
files: ${{ steps.ctx.outputs.tarball }}
make_latest: 'false'
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "providers/couchbase"]
path = providers/couchbase
url = https://github.com/couchbaselabs/wasmcloud-provider-couchbase
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# wasmCloud-contrib
# wasmCloud contrib

Community contributions of providers, components, and demos

Expand All @@ -7,12 +7,17 @@ Community contributions of providers, components, and demos
- [moonbit/http-hello-world](./components/moonbit/http-hello-world/) is an example component that implements the `wasi-http/incoming-handler@0.2.0` interface and is built with [Moonbit](https://www.moonbitlang.com/)

## Deployments

Examples and scripts to help you deploy and operate wasmCloud on various platforms.

- [Akamai](./deploy/akamai/) for running wasmCloud on Akamai's LKE service
- [baremetal](./deploy/baremetal) with example systemd units and config files for 'baremetal' deployments
- [k8s](./deploy/k8s) for best practices, patterns, and examples for deploying wasmCloud on k8s
- [k8s kustomize / kind](./deploy/k8s/kustomize/) for a walkthrough of deploying wasmCloud with [kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/) on [kind](https://kind.sigs.k8s.io/docs/user/quick-start/)
- [k8s](./deploy/k8s) for best practices, patterns, and examples for deploying wasmCloud on k8s
- [k8s kustomize / kind](./deploy/k8s/kustomize/) for a walkthrough of deploying wasmCloud with [kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/) on [kind](https://kind.sigs.k8s.io/docs/user/quick-start/)

## Providers

- [Couchbase](./providers/couchbase/) is a submodule of [couchbaselabs/wasmcloud-provider-couchbase](https://github.com/couchbaselabs/wasmcloud-provider-couchbase) brought here for wasmCloud signed releases of the provider

## Secrets

Expand Down
1 change: 1 addition & 0 deletions providers/couchbase
Submodule couchbase added at 4ccd4e
Loading