Skip to content
Open
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
4 changes: 0 additions & 4 deletions .github/pull_request_template.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/pull_request_template.md.license

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/_fission_build_artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build artifacts

on:
push:
tags:
- "*"

permissions:
contents: write

jobs:
wasm_build_web:
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
container: emscripten/emsdk
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: ⚙️ Install deps
run: sudo apt update -y && sudo apt install -y cmake gperf

- name: 🏗️ Build WASM for web
working-directory: ./src/platforms/emscripten/
run: |
set -euo pipefail
mkdir build
cd build
emcmake cmake .. -DAVM_EMSCRIPTEN_ENV=web
emmake make -j $(nproc)

- name: Vars setup
id: setup
run: |
echo "artifacts_dir=src/platforms/emscripten/build/src" >> $GITHUB_OUTPUT

- name: "Rename artifacts"
working-directory: ${{ steps.setup.outputs.artifacts_dir }}
run: |
gzip -k "AtomVM.mjs"
sha256sum "AtomVM.mjs" > "AtomVM.mjs.sha256"
gzip -k "AtomVM.wasm"
sha256sum "AtomVM.wasm" > "AtomVM.wasm.sha256"

- name: "Release (web)"
uses: softprops/action-gh-release@v2
with:
draft: ${{ startsWith( github.ref_name, 'test-') }}
prerelease: ${{ contains( github.ref_name, '-dev') || contains( github.ref_name, '-rc') }}
fail_on_unmatched_files: true
files: |
${{ steps.setup.outputs.artifacts_dir }}/AtomVM.mjs
${{ steps.setup.outputs.artifacts_dir }}/AtomVM.mjs.gz
${{ steps.setup.outputs.artifacts_dir }}/AtomVM.mjs.sha256
${{ steps.setup.outputs.artifacts_dir }}/AtomVM.wasm
${{ steps.setup.outputs.artifacts_dir }}/AtomVM.wasm.gz
${{ steps.setup.outputs.artifacts_dir }}/AtomVM.wasm.sha256
60 changes: 60 additions & 0 deletions .github/workflows/_fission_build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Build & test

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/main' && github.ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
name: Build & test
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- uses: webfactory/ssh-agent@v0.6.0
with:
ssh-private-key: |
${{ secrets.ACCESS_TO_ELIXIR_WASM }}
- name: Set up Elixir
uses: erlef/setup-beam@61e01a43a562a89bfc54c7f9a378ff67b03e4a21 # v1.16.0
with:
elixir-version: "1.17.3"
otp-version: "26.0.2"
- name: Install deps
run: |
sudo apt install -y gperf libmbedtls-dev zlib1g-dev
- name: Build
run: |
echo "" > libs/CMakeLists.txt # disable stdlibs compilation, which hangs for unknown reasons
export PATH=$PATH:/home/runner/.mix/elixir/1-17/ # for rebar3
mkdir build
cd build
cmake -DAVM_BUILD_RUNTIME_ONLY=ON -DSANITIZER=OFF -DDEBUG_GC=ON -DDEBUG_ASSERTIONS=ON ..
make -j $(nproc)
# - name: Test
# run: |
# cd build
# tests/test-erlang
# tests/test-enif
# tests/test-mailbox
# tests/test-structs
- name: Build Popcorn
run: |
git clone git@github.com:software-mansion/popcorn.git -b mf/downstream-atomvm
cd popcorn
echo "import Config; config :popcorn, target: :unix, runtime: {:path, \"../build/src\"}" > config/config.secret.exs
mix deps.get
export PATH=$PATH:/home/runner/.mix/elixir/1-17/ # for rebar3
MIX_ENV=test mix popcorn.build_runtime --target unix
- name: Test Popcorn
run: cd popcorn && mix test
5 changes: 4 additions & 1 deletion .github/workflows/build-and-test-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: Build and Test on macOS

on:
disabled:
push:
paths-ignore:
- 'src/platforms/emscripten/**'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-and-test-on-freebsd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: build-and-test-on-freebsd

on:
disabled:
push:
paths-ignore:
- 'src/platforms/emscripten/**'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-and-test-other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: Build and Test on Other Architectures

on:
disabled:
push:
paths-ignore:
- 'src/platforms/emscripten/**'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: Build and Test

on:
disabled:
push:
paths-ignore:
- 'src/platforms/emscripten/**'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
#
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:
# This is a workflow for atomvm/AtomVM to Publish API documentation and other content from the `doc` directory to
# doc.atomvm.org hosted on GitHub Pages

name: Build Docs

# Controls when the workflow will run
on:
disabled:
# Triggers the workflow on push request and tag events on main branch
pull_request:
tags:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-libraries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: Build Libraries

on:
disabled:
push:
tags:
- '**'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-linux-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: Build Linux Artifacts

on:
disabled:
push:
tags:
- '**'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/check-formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: "Check formatting"

on:
disabled:
push:
paths:
- '.github/workflows/**'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: "CodeQL"

on:
disabled:
push:
paths-ignore:
- 'src/platforms/emscripten/**'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/esp32-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: ESP32 Builds

on:
disabled:
push:
paths:
- '.github/workflows/esp32-build.yaml'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/esp32-mkimage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: esp32-mkimage

on:
disabled:
push:
paths:
- '.github/workflows/esp32-mkimage.yaml'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/esp32-simtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: ESP32 Sim test

on:
disabled:
push:
paths:
- ".github/workflows/esp32-simtest.yaml"
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pico-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: Pico Build

on:
disabled:
push:
paths:
- '.github/workflows/pico-build.yaml'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
#
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:
# This is a workflow for atomvm/AtomVM to Publish API documentation and other content from the `doc` directory to
# doc.atomvm.org hosted on GitHub Pages

name: Publish Docs

# Controls when the workflow will run
on:
disabled:
# Triggers the workflow on pull request, tag events and pushes on main
push:
tags:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: REUSE Compliance Check

on: [push, pull_request]
disabled: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/main' && github.ref || github.run_id }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/run-tests-with-beam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: Run tests with BEAM

on:
disabled:
push:
paths-ignore:
- 'src/platforms/emscripten/**'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/stm32-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: STM32 Build

on:
disabled:
push:
paths:
- '.github/workflows/stm32-build.yaml'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/wasm-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#

on:
workflow_dispatch:

name: Wasm Build

on:
disabled:
push:
paths:
- '.github/workflows/wasm-build.yaml'
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ find_package(Erlang)
find_package(Elixir)
find_package(Gleam)

set(SANITIZER "address" CACHE STRING "Enable Address Sanitizer") # Include address, memory, or undefined sanitizer

option(AVM_DISABLE_FP "Disable floating point support." OFF)
option(AVM_DISABLE_SMP "Disable SMP." OFF)
option(AVM_DISABLE_TASK_DRIVER "Disable task driver support." OFF)
Expand Down
Loading