Skip to content

Commit 8259320

Browse files
committed
Merge branch 'main' into feature/bigint
2 parents b63a664 + 599ed7b commit 8259320

File tree

227 files changed

+15593
-1697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+15593
-1697
lines changed

.github/workflows/build-and-test-macos.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
matrix:
4040
os: ["macos-13", "macos-14", "macos-15"]
41-
otp: ["24", "25", "26", "27"]
41+
otp: ["24", "25", "26", "27", "28"]
4242

4343
steps:
4444
# Setup
@@ -48,21 +48,21 @@ jobs:
4848
submodules: 'recursive'
4949

5050
- name: "Install deps"
51-
if: matrix.otp != '24'
52-
run: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gperf doxygen erlang@${{ matrix.otp }} gleam ninja mbedtls rebar3
51+
if: matrix.otp != '24' && matrix.otp != '25'
52+
run: brew update && HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gperf doxygen erlang@${{ matrix.otp }} gleam mbedtls rebar3
5353

5454
- name: "Install deps"
55-
if: matrix.otp == '24'
55+
if: matrix.otp == '24' || matrix.otp == '25'
5656
run: |
57-
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gperf doxygen erlang@${{ matrix.otp }} gleam ninja mbedtls
57+
brew update
58+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gperf doxygen erlang@${{ matrix.otp }} gleam mbedtls
5859
wget https://github.com/erlang/rebar3/releases/download/3.23.0/rebar3
5960
chmod +x rebar3
60-
if [ -e /usr/local/opt/erlang@24/bin/ ] ; then
61-
sudo cp rebar3 /usr/local/opt/erlang@24/bin/
62-
fi
63-
if [ -e /opt/homebrew/opt/erlang@24/bin/ ] ; then
64-
sudo cp rebar3 /opt/homebrew/opt/erlang@24/bin/
65-
fi
61+
for bin_dir in {/usr/local,/opt/homebrew}/opt/erlang@{24,25}/bin/ ; do
62+
if [ -e ${bin_dir} ]; then
63+
sudo cp rebar3 ${bin_dir}
64+
fi
65+
done
6666
6767
# Builder info
6868
- name: "System info"

.github/workflows/build-and-test-other.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
9595
- arch: "arm32v7"
9696
platform: "arm/v7"
97-
tag: "bullseye"
97+
tag: "bookworm"
9898
# -D_FILE_OFFSET_BITS=64 is required for making atomvm:posix_readdir/1 test work
9999
# otherwise readdir will fail due to 64 bits inode numbers with 32 bit ino_t
100100
cflags: "-mcpu=cortex-a7 -mfloat-abi=hard -O2 -mthumb -mthumb-interwork -D_FILE_OFFSET_BITS=64"
@@ -159,6 +159,7 @@ jobs:
159159
mkdir -p build &&
160160
cd build &&
161161
cmake .. ${{ matrix.cmake_opts }} &&
162+
make PackBEAM &&
162163
cp ../build_tests/tests/erlang_tests/*.beam tests/erlang_tests/ &&
163164
cp ../build_tests/tests/erlang_tests/code_load/*.{avm,beam,hrl} tests/erlang_tests/code_load/ &&
164165
mkdir -p tests/erlang_tests/code_load/beams/ &&
@@ -167,6 +168,8 @@ jobs:
167168
cp ../build_tests/tests/libs/estdlib/*.avm tests/libs/estdlib/ &&
168169
cp ../build_tests/tests/libs/eavmlib/*.avm tests/libs/eavmlib/ &&
169170
cp ../build_tests/tests/libs/alisp/*.avm tests/libs/alisp/ &&
171+
touch tests/erlang_tests/code_load/code_load_pack.avm &&
172+
touch tests/erlang_tests/code_load/code_load_pack_data.hrl &&
170173
make AtomVM &&
171174
make test-erlang &&
172175
make test-enif &&

.github/workflows/build-and-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ jobs:
192192
rebar3_version: "3.24.0"
193193

194194
- otp: "27"
195-
elixir_version: "1.17"
195+
elixir_version: "1.18"
196196
rebar3_version: "3.24.0"
197197

198198
# Old versions of OTP/Elixir

.github/workflows/build-docs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
55
#
66
# This is a workflow for atomvm/AtomVM to Publish API documentation and other content from the `doc` directory to
7-
# atomvm.net hosted on GitHub Pages
7+
# doc.atomvm.org hosted on GitHub Pages
88

99
name: Build Docs
1010

@@ -20,6 +20,7 @@ on:
2020
paths:
2121
- '.github/workflows/**'
2222
- 'CMakeLists.txt'
23+
- 'CMakeModules/**'
2324
- 'doc/**'
2425
- 'libs/**'
2526
- 'src/libAtomVM/**'
@@ -33,6 +34,7 @@ on:
3334
paths:
3435
- '.github/workflows/**'
3536
- 'CMakeLists.txt'
37+
- 'CMakeModules/**'
3638
- 'doc/**'
3739
- 'libs/**'
3840
- 'src/libAtomVM/**'

.github/workflows/build-linux-artifacts.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
path: build_tests
190190

191191
- name: Set up QEMU
192-
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
192+
uses: docker/setup-qemu-action@v3
193193

194194
- name: Build AtomVM using docker
195195
timeout-minutes: 15

.github/workflows/check-formatting.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ on:
1111
paths:
1212
- '.github/workflows/**'
1313
- 'CMakeLists.txt'
14+
- 'CMakeModules/**'
1415
- 'src/**'
1516
- 'tests/**'
1617
- '**/*.erl'
1718
pull_request:
1819
paths:
1920
- '.github/workflows/**'
2021
- 'CMakeLists.txt'
22+
- 'CMakeModules/**'
2123
- 'src/**'
2224
- 'tests/**'
2325
- '**/*.erl'

.github/workflows/esp32-build.yaml

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
paths:
1212
- '.github/workflows/esp32-build.yaml'
1313
- 'CMakeLists.txt'
14+
- 'CMakeModules/**'
1415
- 'libs/**'
1516
- 'src/platforms/esp32/**'
1617
- 'src/platforms/esp32/**/**'
@@ -19,9 +20,13 @@ on:
1920
pull_request:
2021
paths:
2122
- '.github/workflows/esp32-build.yaml'
23+
- 'CMakeLists.txt'
24+
- 'CMakeModules/**'
25+
- 'libs/**'
2226
- 'src/platforms/esp32/**'
2327
- 'src/platforms/esp32/**/**'
2428
- 'src/libAtomVM/**'
29+
- 'tools/packbeam/**'
2530

2631
concurrency:
2732
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/main' && github.ref || github.run_id }}
@@ -31,28 +36,50 @@ jobs:
3136
esp-idf:
3237
runs-on: ubuntu-24.04
3338
container: espressif/idf:${{ matrix.idf-version }}
39+
permissions:
40+
actions: read
41+
contents: read
42+
security-events: write
3443

3544
strategy:
3645
fail-fast: false
3746

3847
matrix:
39-
esp-idf-target: ["esp32", "esp32c3"]
48+
esp-idf-target: ["esp32", "esp32c3", "esp32p4"]
49+
language: ['cpp']
4050
idf-version:
41-
- 'v5.0.7'
42-
- 'v5.1.5'
43-
- 'v5.2.3'
44-
- 'v5.3.2'
45-
- 'v5.4'
51+
- 'v5.0.9'
52+
- 'v5.1.6'
53+
- 'v5.2.5'
54+
- 'v5.3.3'
55+
- 'v5.4.1'
4656

4757
exclude:
4858
- esp-idf-target: "esp32c3"
49-
idf-version: 'v5.0.7'
59+
idf-version: 'v5.0.9'
5060
- esp-idf-target: "esp32c3"
51-
idf-version: 'v5.1.5'
61+
idf-version: 'v5.1.6'
62+
- esp-idf-target: "esp32p4"
63+
idf-version: 'v5.0.9'
64+
- esp-idf-target: "esp32p4"
65+
idf-version: 'v5.1.6'
66+
- esp-idf-target: "esp32p4"
67+
idf-version: 'v5.2.5'
68+
5269
steps:
5370
- name: Checkout repo
5471
uses: actions/checkout@v4
5572

73+
- name: "Git config safe.directory for codeql"
74+
run: git config --global --add safe.directory /__w/AtomVM/AtomVM
75+
76+
- name: "Initialize CodeQL"
77+
uses: github/codeql-action/init@v3
78+
with:
79+
languages: ${{matrix.language}}
80+
build-mode: manual
81+
queries: +./code-queries/term-to-non-term-func.ql,./code-queries/non-term-to-term-func.ql
82+
5683
- name: Build with idf.py
5784
shell: bash
5885
working-directory: ./src/platforms/esp32/
@@ -69,6 +96,9 @@ jobs:
6996
. $IDF_PATH/export.sh
7097
idf.py size-components
7198
99+
- name: "Perform CodeQL Analysis"
100+
uses: github/codeql-action/analyze@v3
101+
72102
- name: Install dependencies to build host AtomVM and run qemu
73103
run: |
74104
set -eu
@@ -129,6 +159,11 @@ jobs:
129159
tar -xf ${QEMU_RISCV32_DIST} -C /opt && rm ${QEMU_RISCV32_DIST}
130160
131161
- name: Install pytest and pytest-embedded plugins
162+
# ESP32P4 is not currently supported by espressif/qemu, but an issue has been opened
163+
# (https://github.com/espressif/qemu/issues/127) and marked as "todo" status, but no
164+
# expected timeline is available yet.
165+
# TODO: remove the following exclusion when ESP32P4 support is added to espressif/qemu
166+
if: matrix.esp-idf-target != 'esp32p4'
132167
run: |
133168
set -e
134169
. $IDF_PATH/export.sh
@@ -139,6 +174,8 @@ jobs:
139174
pytest-embedded-qemu==1.10.3
140175
141176
- name: Build ESP32 tests using idf.py with memory checks
177+
# TODO: remove the following exclusion when ESP32P4 support is added to espressif/qemu
178+
if: matrix.esp-idf-target != 'esp32p4'
142179
working-directory: ./src/platforms/esp32/test/
143180
run: |
144181
set -e
@@ -156,6 +193,8 @@ jobs:
156193
idf.py build
157194
158195
- name: Run ESP32 tests using qemu with memory checks build
196+
# TODO: remove the following exclusion when ESP32P4 support is added to espressif/qemu
197+
if: matrix.esp-idf-target != 'esp32p4'
159198
working-directory: ./src/platforms/esp32/test/
160199
timeout-minutes: 10
161200
run: |
@@ -167,6 +206,8 @@ jobs:
167206
cp sdkconfig.defaults.backup sdkconfig.defaults
168207
169208
- name: Build ESP32 tests using idf.py
209+
# TODO: remove the following exclusion when ESP32P4 support is added to espressif/qemu
210+
if: matrix.esp-idf-target != 'esp32p4'
170211
working-directory: ./src/platforms/esp32/test/
171212
run: |
172213
set -e
@@ -177,6 +218,8 @@ jobs:
177218
idf.py build
178219
179220
- name: Run ESP32 tests using qemu
221+
# TODO: remove the following exclusion when ESP32P4 support is added to espressif/qemu
222+
if: matrix.esp-idf-target != 'esp32p4'
180223
working-directory: ./src/platforms/esp32/test/
181224
timeout-minutes: 10
182225
run: |

.github/workflows/esp32-mkimage.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
paths:
1212
- '.github/workflows/esp32-mkimage.yaml'
1313
- 'CMakeLists.txt'
14+
- 'CMakeModules/**'
1415
- 'libs/**'
1516
- 'src/platforms/esp32/**'
1617
- 'src/platforms/esp32/**/**'
@@ -19,9 +20,13 @@ on:
1920
pull_request:
2021
paths:
2122
- '.github/workflows/esp32-mkimage.yaml'
23+
- 'CMakeLists.txt'
24+
- 'CMakeModules/**'
25+
- 'libs/**'
2226
- 'src/platforms/esp32/**'
2327
- 'src/platforms/esp32/**/**'
2428
- 'src/libAtomVM/**'
29+
- 'tools/packbeam/**'
2530

2631
permissions:
2732
contents: write
@@ -32,12 +37,12 @@ concurrency:
3237

3338
jobs:
3439
esp32-release:
35-
runs-on: ubuntu-22.04
40+
runs-on: ubuntu-24.04
3641
container: espressif/idf:v${{ matrix.idf-version }}
3742

3843
strategy:
3944
matrix:
40-
idf-version: ["5.3.2"]
45+
idf-version: ["5.4.1"]
4146
cc: ["clang-14"]
4247
cxx: ["clang++-14"]
4348
cflags: ["-O3"]
@@ -53,7 +58,7 @@ jobs:
5358
CXX: ${{ matrix.cxx }}
5459
CFLAGS: ${{ matrix.cflags }}
5560
CXXFLAGS: ${{ matrix.cflags }}
56-
ImageOS: "ubuntu22"
61+
ImageOS: "ubuntu24"
5762

5863
steps:
5964
- name: Checkout repo

.github/workflows/esp32-simtest.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
paths:
1313
- ".github/workflows/esp32-simtest.yaml"
1414
- "CMakeLists.txt"
15+
- 'CMakeModules/**'
1516
- "libs/**"
1617
- "src/platforms/esp32/**"
1718
- "src/platforms/esp32/**/**"
@@ -20,9 +21,13 @@ on:
2021
pull_request:
2122
paths:
2223
- ".github/workflows/esp32-simtest.yaml"
24+
- "CMakeLists.txt"
25+
- 'CMakeModules/**'
26+
- "libs/**"
2327
- "src/platforms/esp32/**"
2428
- "src/platforms/esp32/**/**"
2529
- "src/libAtomVM/**"
30+
- "tools/packbeam/**"
2631

2732
concurrency:
2833
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/main' && github.ref || github.run_id }}
@@ -75,16 +80,16 @@ jobs:
7580
"esp32h2",
7681
"esp32p4",
7782
]
78-
idf-version: ${{ ((contains(github.event.head_commit.message, 'full_sim_test')||contains(github.event.pull_request.title, 'full_sim_test')) && fromJSON('["v5.1.5", "v5.2.3", "v5.3.2", "v5.4"]')) || fromJSON('["v5.3.2"]') }}
83+
idf-version: ${{ ((contains(github.event.head_commit.message, 'full_sim_test')||contains(github.event.pull_request.title, 'full_sim_test')) && fromJSON('["v5.1.6", "v5.2.5", "v5.3.3", "v5.4.1"]')) || fromJSON('["v5.4.1"]') }}
7984
exclude:
8085
- esp-idf-target: "esp32p4"
81-
idf-version: "v5.1.5"
86+
idf-version: "v5.1.6"
8287
- esp-idf-target: "esp32p4"
83-
idf-version: "v5.2.3"
88+
idf-version: "v5.2.5"
8489
- esp-idf-target: "esp32h2"
85-
idf-version: "v5.1.5"
90+
idf-version: "v5.1.6"
8691
- esp-idf-target: "esp32h2"
87-
idf-version: "v5.2.3"
92+
idf-version: "v5.2.5"
8893

8994
steps:
9095
- name: Checkout repo

0 commit comments

Comments
 (0)