Skip to content

Inspecting floats: add test, remove unnecessary patch (#427) #423

Inspecting floats: add test, remove unnecessary patch (#427)

Inspecting floats: add test, remove unnecessary patch (#427) #423

# 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: Hello Popcorn - Build & test
on:
push:
branches: ["**"]
paths:
- "**"
- "!misc/**"
- "!examples/**"
- "examples/hello_popcorn/**"
- "!.github/**"
- ".github/workflows/hello_popcorn_build_test.yml"
permissions:
contents: read
env:
CI: true
MIX_ENV: test
ImageOS: "ubuntu22"
jobs:
build:
name: Build & test
runs-on: ubuntu-22.04
defaults:
run:
working-directory: examples/hello_popcorn
steps:
- uses: actions/checkout@v4
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14
with:
# Make sure to set a version number!
version: 4.0.7
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.ACCESS_TO_FISSIONVM }}
- name: Set up Elixir
uses: erlef/setup-beam@61e01a43a562a89bfc54c7f9a378ff67b03e4a21 # v1.16.0
with:
elixir-version: "1.17.3"
otp-version: "26.0.2"
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install AtomVM deps
run: |
sudo apt-get update && sudo apt-get install -y gperf libmbedtls-dev zlib1g-dev
- name: Install dependencies
run: mix deps.get && mix deps.compile
- name: Install Playwright deps
run: mix playwright.install
- name: Build AtomVM
run: |
mix popcorn.build_runtime --target wasm --cmake-opts "SANITIZER=OFF"
echo 'config :popcorn, runtime: {:path, "popcorn_runtime_source/artifacts/$target"}' >> config/config.exs
- name: Cook
run: mix popcorn.cook
- name: Run tests
run: mix test --no-start