diff --git a/.github/workflows/library-wamrbc762f.yaml b/.github/workflows/library-wamrbc762f.yaml new file mode 100644 index 00000000..e90f1e73 --- /dev/null +++ b/.github/workflows/library-wamrbc762f.yaml @@ -0,0 +1,77 @@ +name: library/wamrbc76sf + +on: + schedule: + - cron: '0 0 * * *' # Everyday at 12AM + + push: + branches: [main] + paths: + - 'library/wamr/bc762f/**' + - '.github/workflows/library-wamrbc762f.yaml' + + pull_request: + types: [opened, synchronize, reopened] + branches: [main] + paths: + - 'library/wamr/bc762f/**' + - '.github/workflows/library-wamrbc762f.yaml' + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + - plat: qemu + arch: x86_64 + - plat: qemu + arch: arm64 + - plat: fc + arch: x86_64 + - plat: fc + arch: arm64 + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Build WAMR-bc762f + uses: unikraft/kraftkit@staging + with: + loglevel: debug + workdir: library/wamr/bc762f + runtimedir: /github/workspace/.kraftkit + plat: ${{ matrix.plat }} + arch: ${{ matrix.arch }} + push: false + output: oci://index.unikraft.io/unikraft.org/wamr:bc762f + + - name: Archive OCI digests + uses: actions/upload-artifact@v3 + with: + name: oci-digests-${{ matrix.arch }}-${{ matrix.plat }} + path: ${{ github.workspace }}/.kraftkit/oci/digests + if-no-files-found: error + + push: + if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} + needs: [ build ] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Login to OCI registry + uses: docker/login-action@v2 + with: + registry: index.unikraft.io + username: ${{ secrets.REG_USERNAME }} + password: ${{ secrets.REG_TOKEN }} + + - name: Retrieve, merge and push OCI digests + uses: ./.github/actions/merge-oci-digests + with: + name: index.unikraft.io/unikraft.org/wamr:bc762f + push: true diff --git a/library/wamr/bc762f/Kraftfile b/library/wamr/bc762f/Kraftfile new file mode 100644 index 00000000..da4fcbf5 --- /dev/null +++ b/library/wamr/bc762f/Kraftfile @@ -0,0 +1,31 @@ +spec: v0.6 + +name: wamr + +rootfs: ./rootfs + +cmd: ["/main.wasm"] + +unikraft: + version: stable + kconfig: + CONFIG_LIBRAMFS: 'y' + CONFIG_LIBUK9P: 'y' + CONFIG_LIBUKBUS: 'y' + CONFIG_LIBUKCPIO: 'y' + CONFIG_LIBUKDEBUG_ANSI_COLOR: 'y' + CONFIG_LIBUKLIBPARAM: 'y' + CONFIG_LIBVFSCORE_AUTOMOUNT_ROOTFS: 'y' + CONFIG_LIBVFSCORE_FSTAB: 'y' + CONFIG_LIBVFSCORE_ROOTFS_INITRD: 'y' + +targets: +- qemu/x86_64 +- qemu/arm64 +- fc/x86_64 +- fc/arm64 + +libraries: + musl: stable + lwip: stable + wamr: stable diff --git a/library/wamr/bc762f/Makefile.uk b/library/wamr/bc762f/Makefile.uk new file mode 100644 index 00000000..ee212de3 --- /dev/null +++ b/library/wamr/bc762f/Makefile.uk @@ -0,0 +1 @@ +$(eval $(call addlib,appmicropython)) diff --git a/library/wamr/bc762f/README.md b/library/wamr/bc762f/README.md new file mode 100644 index 00000000..3838e625 --- /dev/null +++ b/library/wamr/bc762f/README.md @@ -0,0 +1,15 @@ +# WAMR (Wasm Micro Runtime) Image + +This directory contains the definition for the `unikraft.org/wamr` image. + +To run this image, [install Unikraft's companion command-line toolchain `kraft`](https://unikraft.org/docs/cli) and then you can run: + +``` +kraft run unikraft.org/wamr:bc762f +``` + +Once executed you will get a "Hello, World!" message and one regarding a memory address. + +## See also + +- [How to run unikernels locally in Unikraft's Documentation](https://unikraft.org/docs/cli/running). diff --git a/library/wamr/bc762f/rootfs/main.wasm b/library/wamr/bc762f/rootfs/main.wasm new file mode 100644 index 00000000..40d2b082 Binary files /dev/null and b/library/wamr/bc762f/rootfs/main.wasm differ