Skip to content

docs: add note about deprecated status #837

docs: add note about deprecated status

docs: add note about deprecated status #837

Workflow file for this run

name: WasmCloud Release
on:
push:
branches: [main]
tags: ["v*"] # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch: # Allow manual creation of artifacts without a release
pull_request:
branches: [main]
jobs:
erts-linux:
strategy:
matrix:
target:
- aarch64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- x86_64-unknown-linux-gnu
name: erts-${{ matrix.target }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-nix
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build ERTS
run: nix build -L .#erts-${{ matrix.target }}-fhs
- run: cp $(readlink ./result) erts.tar.gz
- uses: actions/upload-artifact@v3
with:
name: erts-${{ matrix.target }}
path: erts.tar.gz
if-no-files-found: error
nif-darwin:
strategy:
matrix:
target:
- aarch64-apple-darwin
- x86_64-apple-darwin
name: nif-${{ matrix.target }}
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install stable --profile minimal
- run: rustup target add ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
if: ${{ !startswith(github.ref, 'refs/tags/') }} # Do not cache on tag pushes
with:
workspaces: "host_core/native/hostcore_wasmcloud_native"
- name: Build NIF
run: |
cd ./host_core/native/hostcore_wasmcloud_native
cargo build --target ${{ matrix.target }} --release
- uses: actions/upload-artifact@v3
with:
name: nif-${{ matrix.target }}
path: ./host_core/native/hostcore_wasmcloud_native/target/${{ matrix.target }}/release/libhostcore_wasmcloud_native.dylib
if-no-files-found: error
nif-linux:
strategy:
matrix:
target:
- aarch64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- x86_64-unknown-linux-gnu
name: nif-${{ matrix.target }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-nix
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build NIF
run: nix build -L .#hostcore_wasmcloud_native-${{ matrix.target }}-fhs
- uses: actions/upload-artifact@v3
with:
name: nif-${{ matrix.target }}
path: ./result/lib/libhostcore_wasmcloud_native.so
if-no-files-found: error
nif-windows:
name: nif-x86_64-pc-windows-msvc
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
if: ${{ !startswith(github.ref, 'refs/tags/') }} # Do not cache on tag pushes
with:
workspaces: "host_core/native/hostcore_wasmcloud_native"
- name: Build NIF
run: |
cd ./host_core/native/hostcore_wasmcloud_native
cargo build --release
- uses: actions/upload-artifact@v3
with:
name: nif-x86_64-pc-windows-msvc
path: host_core/native/hostcore_wasmcloud_native/target/release/hostcore_wasmcloud_native.dll
if-no-files-found: error
burrito-darwin:
strategy:
matrix:
config:
- package: host_core
arch: aarch64
- package: host_core
arch: x86_64
- package: wasmcloud_host
arch: aarch64
- package: wasmcloud_host
arch: x86_64
needs:
- nif-darwin
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-nix
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- uses: actions/download-artifact@v3
with:
path: /tmp/nif/lib
name: nif-${{ matrix.config.arch }}-apple-darwin
- name: Wrap ${{ matrix.config.package }} ${{ matrix.config.arch }} Darwin burrito
env:
SECRET_KEY_BASE: ${{ secrets.WASMCLOUD_HOST_SECRET_KEY_BASE }}
run: |
nix build \
--impure \
--override-input hostcore_wasmcloud_native-${{ matrix.config.arch }}-apple-darwin-mac /tmp/nif \
-L .#${{ matrix.config.package }}-burrito-${{ matrix.config.arch }}-darwin
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.package }}_${{ matrix.config.arch }}_darwin
path: ./result/bin/${{ matrix.config.package }}_${{ matrix.config.arch }}_darwin
if-no-files-found: error
burrito-linux:
strategy:
matrix:
config:
- package: host_core
arch: aarch64
libc: gnu
- package: host_core
arch: aarch64
libc: musl
- package: host_core
arch: x86_64
libc: gnu
- package: host_core
arch: x86_64
libc: musl
- package: wasmcloud_host
arch: aarch64
libc: gnu
- package: wasmcloud_host
arch: aarch64
libc: musl
- package: wasmcloud_host
arch: x86_64
libc: gnu
- package: wasmcloud_host
arch: x86_64
libc: musl
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-nix
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Wrap ${{ matrix.config.package }} ${{ matrix.config.arch }} Linux ${{ matrix.config.libc }} burrito
env:
SECRET_KEY_BASE: ${{ secrets.WASMCLOUD_HOST_SECRET_KEY_BASE }}
run: |
nix build \
--impure \
-L .#${{ matrix.config.package }}-burrito-${{ matrix.config.arch }}-linux-${{ matrix.config.libc }}
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.package }}_${{ matrix.config.arch }}_linux_${{ matrix.config.libc }}
path: ./result/bin/${{ matrix.config.package }}_${{ matrix.config.arch }}_linux_${{ matrix.config.libc }}
if-no-files-found: error
burrito-windows:
strategy:
matrix:
package:
- host_core
- wasmcloud_host
needs:
- nif-windows
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-nix
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- uses: actions/download-artifact@v3
with:
path: /tmp/nif/lib
name: nif-x86_64-pc-windows-msvc
- name: Wrap ${{ matrix.package }} x86_64 Windows burrito
env:
SECRET_KEY_BASE: ${{ secrets.WASMCLOUD_HOST_SECRET_KEY_BASE }}
run: |
nix build \
--impure \
--override-input hostcore_wasmcloud_native-x86_64-pc-windows-msvc /tmp/nif \
-L .#${{ matrix.package }}-burrito-x86_64-windows
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.package }}_x86_64_windows
path: ./result/bin/${{ matrix.package }}_x86_64_windows.exe
if-no-files-found: error
test-darwin:
strategy:
matrix:
os:
- macos-11
- macos-12
- macos-13
runs-on: ${{ matrix.os }}
needs:
- burrito-darwin
steps:
- run: curl -sL 'https://github.com/nats-io/nats-server/releases/download/v2.9.16/nats-server-v2.9.16-darwin-amd64.tar.gz' | tar xzv --strip-components 1
- uses: actions/download-artifact@v3
with:
name: host_core_x86_64_darwin
- run: chmod +x ./host_core_x86_64_darwin
- run: |
./nats-server &
./host_core_x86_64_darwin & sleep 30; kill $!
- uses: actions/download-artifact@v3
with:
name: wasmcloud_host_x86_64_darwin
- run: chmod +x ./wasmcloud_host_x86_64_darwin
- run: |
./nats-server &
./wasmcloud_host_x86_64_darwin & sleep 30; kill $!
test-linux:
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
runs-on: ${{ matrix.os }}
needs:
- burrito-linux
services:
nats:
image: nats
ports:
- 4222:4222
steps:
- uses: actions/download-artifact@v3
with:
name: host_core_x86_64_linux_gnu
- run: chmod +x ./host_core_x86_64_linux_gnu
- run: ./host_core_x86_64_linux_gnu & sleep 30; kill $!
- uses: actions/download-artifact@v3
with:
name: wasmcloud_host_x86_64_linux_gnu
- run: chmod +x ./wasmcloud_host_x86_64_linux_gnu
- run: ./wasmcloud_host_x86_64_linux_gnu & sleep 30; kill $!
test-windows:
strategy:
matrix:
os:
- windows-2019
- windows-2022
runs-on: ${{ matrix.os }}
needs:
- burrito-windows
steps:
- run: curl -sLo 'nats.tar.gz' 'https://github.com/nats-io/nats-server/releases/download/v2.9.16/nats-server-v2.9.16-windows-amd64.tar.gz'
- run: tar xzvf nats.tar.gz --strip-components 1
- uses: actions/download-artifact@v3
with:
name: host_core_x86_64_windows
- run: |
Start-Process ./nats-server.exe
Start-Process ./host_core_x86_64_windows.exe
timeout /t 30
Taskkill /im host_core_x86_64_windows.exe /f
- uses: actions/download-artifact@v3
with:
name: wasmcloud_host_x86_64_windows
- run: |
Start-Process ./nats-server.exe
Start-Process ./wasmcloud_host_x86_64_windows.exe
timeout /t 30
Taskkill /im wasmcloud_host_x86_64_windows.exe /f
release:
# TODO: Build on PRs and pushes to main (but do not push)
# This is currently blocked on the `app-version` computation, which only supports semver tags
# E.g.:
# ```
# Error: buildx failed with: ERROR: invalid tag "wasmcloud.azurecr.io/wasmcloud_host:616/merge": invalid reference format
# ```
if: startswith(github.ref, 'refs/tags/')
strategy:
matrix:
app-name:
- host_core
- wasmcloud_host
runs-on: ubuntu-22.04
needs:
- test-darwin
- test-linux
- test-windows
steps:
- uses: actions/checkout@v3
- name: Determine version
run: echo "app-version=${GITHUB_REF_NAME#v}" > $GITHUB_ENV
- name: Login to AzureCR
if: startswith(github.ref, 'refs/tags/') # Only run on tag push
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.AZURECR_PUSH_URL }}
username: ${{ secrets.AZURECR_PUSH_USER }}
password: ${{ secrets.AZURECR_PUSH_PASSWORD }}
- name: Login to DockerHub
if: startswith(github.ref, 'refs/tags/') # Only run on tag push
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_PUSH_USER }}
password: ${{ secrets.DOCKERHUB_PUSH_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
id: buildx-builder
- uses: actions/download-artifact@v3
with:
name: ${{ matrix.app-name }}_aarch64_linux_gnu
path: ${{ matrix.app-name }}
- run: chmod +x ${{ matrix.app-name }}/${{ matrix.app-name }}_aarch64_linux_gnu
- uses: actions/download-artifact@v3
with:
name: ${{ matrix.app-name }}_x86_64_linux_gnu
path: ${{ matrix.app-name }}
- run: chmod +x ${{ matrix.app-name }}/${{ matrix.app-name }}_x86_64_linux_gnu
- name: Build and release docker image
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx-builder.outputs.name }}
push: ${{ startswith(github.ref, 'refs/tags/') }}
context: ${{ matrix.app-name }}
file: ${{ matrix.app-name }}/Dockerfile
platforms: linux/amd64,linux/arm64
build-args: |
BIN_ARM64=${{ matrix.app-name }}_aarch64_linux_gnu
BIN_AMD64=${{ matrix.app-name }}_x86_64_linux_gnu
tags: |
wasmcloud.azurecr.io/${{ matrix.app-name }}:${{ env.app-version }}
wasmcloud/${{ matrix.app-name }}:${{ env.app-version }}
wasmcloud.azurecr.io/${{ matrix.app-name }}:latest
wasmcloud/${{ matrix.app-name }}:latest
github-release:
if: startswith(github.ref, 'refs/tags/') # Only run on tag push
needs:
- release
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v3
with:
name: host_core_aarch64_darwin
- uses: actions/download-artifact@v3
with:
name: host_core_aarch64_linux_gnu
- uses: actions/download-artifact@v3
with:
name: host_core_aarch64_linux_musl
- uses: actions/download-artifact@v3
with:
name: host_core_x86_64_darwin
- uses: actions/download-artifact@v3
with:
name: host_core_x86_64_linux_gnu
- uses: actions/download-artifact@v3
with:
name: host_core_x86_64_linux_musl
- uses: actions/download-artifact@v3
with:
name: host_core_x86_64_windows
- uses: actions/download-artifact@v3
with:
name: wasmcloud_host_aarch64_darwin
- uses: actions/download-artifact@v3
with:
name: wasmcloud_host_aarch64_linux_gnu
- uses: actions/download-artifact@v3
with:
name: wasmcloud_host_aarch64_linux_musl
- uses: actions/download-artifact@v3
with:
name: wasmcloud_host_x86_64_darwin
- uses: actions/download-artifact@v3
with:
name: wasmcloud_host_x86_64_linux_gnu
- uses: actions/download-artifact@v3
with:
name: wasmcloud_host_x86_64_linux_musl
- uses: actions/download-artifact@v3
with:
name: wasmcloud_host_x86_64_windows
- run: chmod +x ./host_core_*
- run: chmod +x ./wasmcloud_host_*
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./host_core_*
./wasmcloud_host_*
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
draft: false
release-charts:
if: ${{ (startswith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch') && startswith(github.repository.name, 'wasmcloud') }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.7.1
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: wasmcloud_host
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"