Fix usage of live in opcodes and no longer preserve registers by default #2194
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright 2022 Davide Bettio <[email protected]> | |
# | |
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later | |
# | |
name: Build and Test on Other Architectures | |
on: | |
push: | |
paths-ignore: | |
- 'src/platforms/esp32/**' | |
- 'src/platforms/stm32/**' | |
- 'doc/**' | |
- 'LICENSES/**' | |
- '*.Md' | |
pull_request: | |
paths-ignore: | |
- 'src/platforms/esp32/**' | |
- 'src/platforms/stm32/**' | |
- 'doc/**' | |
- 'LICENSES/**' | |
- '*.Md' | |
env: | |
otp_version: 24 | |
elixir_version: 1.14 | |
jobs: | |
compile_tests: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ env.otp_version }} | |
elixir-version: ${{ env.elixir_version }} | |
- name: apt update | |
run: sudo apt update | |
- name: Install required packages | |
run: sudo apt install -y gperf | |
- name: Compile test modules | |
run: | | |
set -e | |
mkdir build_tests | |
cd build_tests | |
cmake .. | |
make erlang_test_modules | |
make test_estdlib | |
make test_eavmlib | |
make test_alisp | |
- name: Upload test modules | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-modules | |
path: | | |
build_tests/**/*.avm | |
build_tests/**/*.beam | |
build_tests/**/*.hrl | |
retention-days: 1 | |
build-and-test-other: | |
needs: compile_tests | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: ["arm32v5", "arm32v7", "arm64v8"] | |
include: | |
- arch: "arm32v5" | |
platform: "arm/v5" | |
cflags: "-O2 -mthumb -mthumb-interwork -march=armv4t" | |
cmake_opts: "-DAVM_DISABLE_SMP=On" | |
tag: "stretch" | |
sources: | | |
deb [trusted=yes] http://archive.debian.org/debian/ stretch-backports main | |
deb [trusted=yes] http://archive.debian.org/debian/ stretch-backports-sloppy main | |
deb [trusted=yes] http://archive.debian.org/debian-security/ stretch/updates main | |
deb-src [trusted=yes] http://archive.debian.org/debian-security/ stretch/updates main | |
deb [trusted=yes] http://archive.debian.org/debian/ stretch main | |
deb-src [trusted=yes] http://archive.debian.org/debian/ stretch main | |
# Workaround from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954852 | |
install_deps: | | |
apt update && | |
apt install -y -t stretch-backports-sloppy libarchive13 && | |
apt install -y -t stretch-backports cmake && | |
apt install -y file gcc g++ binutils make doxygen gperf zlib1g-dev libssl-dev | |
- arch: "arm32v7" | |
platform: "arm/v7" | |
tag: "bullseye" | |
cflags: "-mcpu=cortex-a7 -mfloat-abi=hard -O2 -mthumb -mthumb-interwork" | |
- arch: "arm64v8" | |
platform: "arm64/v8" | |
tag: "bullseye" | |
cflags: "-O2" | |
# It looks like we don't really support big-endian | |
# - arch: "powerpc" | |
# distro: "jessie" | |
# base_url: "http://archive.debian.org/debian" | |
# cflags: "-std=gnu99 -Os" | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: apt update | |
run: sudo apt update | |
- name: Install required packages | |
run: sudo apt install -y debootstrap | |
- name: Download test modules | |
uses: actions/download-artifact@v3 | |
with: | |
name: test-modules | |
path: build_tests | |
- name: Set up QEMU | |
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
- name: "Build and Test: AtomVM on foreign arch" | |
timeout-minutes: 15 | |
run: | | |
docker run --platform linux/${{ matrix.platform }} --rm -v $PWD:/atomvm -w /atomvm \ | |
-e CFLAGS="${{ matrix.cflags }}" -e CXXFLAGS="${{ matrix.cflags }}" \ | |
${{ matrix.arch }}/debian:${{ matrix.tag }} /bin/bash -c ' | |
([ -n "${{ matrix.sources }}" ] && echo "${{ matrix.sources }}" > /etc/apt/sources.list || true) && | |
cat /etc/apt/sources.list && | |
if test -n "${{ matrix.install_deps }}"; then | |
echo | |
${{ matrix.install_deps }} | |
else | |
apt update && | |
apt install -y file gcc g++ binutils cmake make doxygen gperf zlib1g-dev libssl-dev | |
fi && | |
file /bin/bash && | |
uname -a && | |
cc --version && | |
ld --version && | |
ldd --version && | |
echo $CFLAGS && | |
echo $CXXFLAGS && | |
cmake --version && | |
mkdir -p build && | |
cd build && | |
cmake .. ${{ matrix.cmake_opts }} && | |
cp ../build_tests/tests/erlang_tests/*.beam tests/erlang_tests/ && | |
cp ../build_tests/tests/erlang_tests/code_load/*.{avm,beam,hrl} tests/erlang_tests/code_load/ && | |
mkdir -p tests/erlang_tests/code_load/beams/ && | |
cp ../build_tests/tests/erlang_tests/code_load/beams/*.beam tests/erlang_tests/code_load/beams/ && | |
cp ../build_tests/tests/libs/estdlib/*.avm tests/libs/estdlib/ && | |
cp ../build_tests/tests/libs/eavmlib/*.avm tests/libs/eavmlib/ && | |
cp ../build_tests/tests/libs/alisp/*.avm tests/libs/alisp/ && | |
make AtomVM && | |
make test-erlang && | |
make test-enif && | |
make test-mailbox && | |
make test-structs && | |
file ./tests/test-erlang && | |
./tests/test-erlang -s prime_smp && | |
file ./tests/test-enif && | |
./tests/test-enif && | |
file ./tests/test-mailbox && | |
./tests/test-mailbox && | |
file ./tests/test-structs && | |
./tests/test-structs && | |
file ./src/AtomVM && | |
./src/AtomVM tests/libs/estdlib/test_estdlib.avm && | |
./src/AtomVM tests/libs/eavmlib/test_eavmlib.avm && | |
./src/AtomVM tests/libs/alisp/test_alisp.avm | |
' |