Skip to content

Commit eb406a8

Browse files
committed
Forward port changes from v0.6 release branch
Merge several changes into main, including: - undef function error - Map string representation, ordered iterator and io:format support for maps - erlang:apply/2,3 - CI improvements, including OTP-27 and testing with newver gcc/clang versions - Allow configuring wifi AP channel - ESP32 conditional build of GPIO module on ESP32 - Fix issue with multiple link creation - byte/bit_size with OTP-27 code - Fix race condition of logger_manager - Fix some missing exported types - Documentation fixes and removed obsolete readmes
2 parents 52c3419 + 699d2c9 commit eb406a8

Some content is hidden

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

51 files changed

+888
-568
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
steps:
4444
# Setup
4545
- name: "Checkout repo"
46-
uses: actions/checkout@v3
46+
uses: actions/checkout@v4
4747
with:
4848
submodules: 'recursive'
4949

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ concurrency:
3333
cancel-in-progress: true
3434

3535
env:
36-
otp_version: 24
37-
elixir_version: 1.14
36+
otp_version: 27
37+
elixir_version: 1.17
3838

3939
jobs:
4040
compile_tests:
41-
runs-on: ubuntu-22.04
41+
runs-on: ubuntu-24.04
4242
steps:
4343
- name: Checkout repo
44-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
4545

4646
- uses: erlef/setup-beam@v1
4747
with:
@@ -66,7 +66,7 @@ jobs:
6666
make test_alisp
6767
6868
- name: Upload test modules
69-
uses: actions/upload-artifact@v3
69+
uses: actions/upload-artifact@v4
7070
with:
7171
name: test-modules
7272
path: |
@@ -77,7 +77,7 @@ jobs:
7777

7878
build-and-test-other:
7979
needs: compile_tests
80-
runs-on: ubuntu-22.04
80+
runs-on: ubuntu-24.04
8181

8282
strategy:
8383
fail-fast: false
@@ -125,7 +125,7 @@ jobs:
125125

126126
steps:
127127
- name: Checkout repo
128-
uses: actions/checkout@v3
128+
uses: actions/checkout@v4
129129

130130
- name: apt update
131131
run: sudo apt update
@@ -134,7 +134,7 @@ jobs:
134134
run: sudo apt install -y debootstrap
135135

136136
- name: Download test modules
137-
uses: actions/download-artifact@v3
137+
uses: actions/download-artifact@v4
138138
with:
139139
name: test-modules
140140
path: build_tests

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

Lines changed: 137 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -40,141 +40,201 @@ jobs:
4040
fail-fast: false
4141

4242
matrix:
43-
os: ["ubuntu-20.04", "ubuntu-22.04"]
44-
cc: ["gcc-7", "gcc-8", "gcc-9", "gcc-10", "gcc-11", "gcc-12", "clang-10", "clang-11"]
45-
# cc: ["gcc-7", "gcc-8", "gcc-9", "gcc-10", "gcc-11", "gcc-12", "clang-10", "clang-11", "clang-12", "clang-13", "clang-14"]
46-
cflags: ["-O3"]
47-
otp: ["21", "22", "23", "24", "25", "master"]
48-
49-
exclude:
50-
# Ubuntu 22.04 with setup-beam only has OTP >= 24.2
51-
- os: "ubuntu-22.04"
52-
otp: "21"
53-
- os: "ubuntu-22.04"
54-
otp: "22"
55-
- os: "ubuntu-22.04"
56-
otp: "23"
57-
5843
# Ubuntu 20.04 has gcc from 7 to 10 ("gcc" is gcc-9)
5944
# Ubuntu 22.04 has gcc from 9 to 12 ("gcc" is gcc-11)
45+
# Ubuntu 24.04 has gcc from 9 to 14 ("gcc" is gcc-13)
6046
# Ubuntu 20.04 has clang 10 and 12 to ("clang" is 10)
61-
# Ubuntu 22.04 has clang from 12 to 14 ("clang" is 14)
47+
# Ubuntu 22.04 has clang from 12 to 15 ("clang" is 14)
48+
# Ubuntu 24.04 has clang from 14 to 18 ("clang" is 18)
6249
# We want to test every compiler but don't need to test every OS
63-
# and we favor later Ubuntu 22.04 + defaults
64-
- os: "ubuntu-22.04"
65-
cc: "gcc-7"
66-
- os: "ubuntu-22.04"
67-
cc: "gcc-8"
68-
- os: "ubuntu-20.04"
69-
cc: "gcc-10"
70-
- os: "ubuntu-20.04"
71-
cc: "gcc-11"
72-
- os: "ubuntu-20.04"
73-
cc: "gcc-12"
74-
- os: "ubuntu-22.04"
75-
cc: "clang-10"
76-
- os: "ubuntu-22.04"
77-
cc: "clang-11"
78-
# - os: "ubuntu-20.04"
79-
# cc: "clang-12"
80-
# - os: "ubuntu-20.04"
81-
# cc: "clang-13"
82-
# - os: "ubuntu-20.04"
83-
# cc: "clang-14"
50+
# We only test several OTP versions with default compilers (gcc-9, 11, 13, clang-10, 14, 18)
51+
cc: ["gcc-9", "gcc-11", "gcc-13", "clang-10", "clang-14", "clang-18"]
52+
cflags: ["-O3"]
53+
otp: ["25", "26", "27"]
8454

8555
include:
8656
- cc: "gcc-7"
8757
cxx: "g++-7"
8858
compiler_pkgs: "gcc-7 g++-7"
59+
os: "ubuntu-20.04"
60+
otp: "27"
8961
- cc: "gcc-8"
9062
cxx: "g++-8"
9163
compiler_pkgs: "gcc-8 g++-8"
64+
os: "ubuntu-20.04"
65+
otp: "27"
9266
- cc: "gcc-9"
9367
cxx: "g++-9"
9468
compiler_pkgs: "gcc-9 g++-9"
69+
os: "ubuntu-20.04"
70+
# otp: all
9571
- cc: "gcc-10"
9672
cxx: "g++-10"
9773
compiler_pkgs: "gcc-10 g++-10"
9874
# Use Werror for recent GCC versions that have better diagnostics
9975
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
76+
os: "ubuntu-22.04"
77+
otp: "27"
10078
- cc: "gcc-11"
10179
cxx: "g++-11"
10280
compiler_pkgs: "gcc-11 g++-11"
10381
# Use Werror for recent GCC versions that have better diagnostics
10482
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
83+
os: "ubuntu-22.04"
84+
# otp: all
10585
- cc: "gcc-12"
10686
cxx: "g++-12"
10787
compiler_pkgs: "gcc-12 g++-12"
10888
# Use Werror for recent GCC versions that have better diagnostics
10989
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
90+
os: "ubuntu-24.04"
91+
otp: "27"
92+
- cc: "gcc-13"
93+
cxx: "g++-13"
94+
compiler_pkgs: "gcc-13 g++-13"
95+
# Use Werror for recent GCC versions that have better diagnostics
96+
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
97+
os: "ubuntu-24.04"
98+
# otp: all
99+
- cc: "gcc-14"
100+
cxx: "g++-14"
101+
compiler_pkgs: "gcc-14 g++-14"
102+
# Use Werror for recent GCC versions that have better diagnostics
103+
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
104+
os: "ubuntu-24.04"
105+
otp: "27"
106+
110107
- cc: "clang-10"
111108
cxx: "clang++-10"
112109
compiler_pkgs: "clang-10"
113110
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
111+
os: "ubuntu-20.04"
112+
# otp: all
114113
- cc: "clang-11"
115114
cxx: "clang++-11"
116115
compiler_pkgs: "clang-11"
117116
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
118-
# - cc: "clang-12"
119-
# cxx: "clang++-12"
120-
# compiler_pkgs: "clang-12"
121-
# - cc: "clang-13"
122-
# cxx: "clang++-13"
123-
# compiler_pkgs: "clang-13"
124-
# - cc: "clang-14"
125-
# cxx: "clang++-14"
126-
# compiler_pkgs: "clang-14"
127-
128-
129-
- otp: "21"
117+
os: "ubuntu-20.04"
118+
otp: "27"
119+
- cc: "clang-12"
120+
cxx: "clang++-12"
121+
compiler_pkgs: "clang-12"
122+
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
123+
os: "ubuntu-22.04"
124+
otp: "27"
125+
- cc: "clang-13"
126+
cxx: "clang++-13"
127+
compiler_pkgs: "clang-13"
128+
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
129+
os: "ubuntu-22.04"
130+
otp: "27"
131+
- cc: "clang-14"
132+
cxx: "clang++-14"
133+
compiler_pkgs: "clang-14"
134+
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
135+
os: "ubuntu-22.04"
136+
# otp: all
137+
- cc: "clang-15"
138+
cxx: "clang++-15"
139+
compiler_pkgs: "clang-15"
140+
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
141+
os: "ubuntu-24.04"
142+
otp: "27"
143+
- cc: "clang-16"
144+
cxx: "clang++-16"
145+
compiler_pkgs: "clang-16"
146+
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
147+
os: "ubuntu-24.04"
148+
otp: "27"
149+
- cc: "clang-17"
150+
cxx: "clang++-17"
151+
compiler_pkgs: "clang-17"
152+
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
153+
os: "ubuntu-24.04"
154+
otp: "27"
155+
- cc: "clang-18"
156+
cxx: "clang++-18"
157+
compiler_pkgs: "clang-18"
158+
cmake_opts_other: "-DAVM_WARNINGS_ARE_ERRORS=ON"
159+
os: "ubuntu-24.04"
160+
# otp: all
161+
162+
- otp: "25"
163+
elixir_version: "1.14"
164+
165+
- otp: "26"
166+
elixir_version: "1.17"
167+
168+
- otp: "27"
169+
elixir_version: "1.17"
170+
171+
# Old versions of OTP/Elixir
172+
- os: "ubuntu-20.04"
173+
cc: "cc"
174+
cxx: "c++"
175+
otp: "21"
176+
cflags: ""
130177
elixir_version: "1.7"
131178

132-
- otp: "22"
179+
- os: "ubuntu-20.04"
180+
cc: "cc"
181+
cxx: "c++"
182+
otp: "22"
183+
cflags: ""
133184
elixir_version: "1.8"
134185

135-
- otp: "23"
186+
- os: "ubuntu-20.04"
187+
cc: "cc"
188+
cxx: "c++"
189+
otp: "23"
190+
cflags: ""
136191
elixir_version: "1.11"
137192

138-
- otp: "24"
139-
elixir_version: "1.14"
140-
141-
- otp: "25"
193+
- os: "ubuntu-22.04"
194+
cc: "cc"
195+
cxx: "c++"
196+
otp: "24"
197+
cflags: ""
142198
elixir_version: "1.14"
143199

144-
- otp: "master"
200+
# master version of OTP/Elixir
201+
- os: "ubuntu-24.04"
202+
cc: "cc"
203+
cxx: "c++"
204+
otp: "master"
145205
elixir_version: "master"
146206

147207
# Additional default compiler builds
148208
- os: "ubuntu-20.04"
149209
cc: "cc"
150210
cxx: "c++"
151-
otp: "25"
211+
otp: "27"
152212
cflags: ""
153-
elixir_version: "1.14"
213+
elixir_version: "1.17"
154214

155215
- os: "ubuntu-22.04"
156216
cc: "cc"
157217
cxx: "c++"
158-
otp: "25"
218+
otp: "27"
159219
cflags: ""
160-
elixir_version: "1.14"
220+
elixir_version: "1.17"
161221

162222
# Additional latest & -Os compiler builds
163-
- os: "ubuntu-22.04"
164-
cc: "gcc-12"
165-
cxx: "g++-12"
166-
otp: "24"
223+
- os: "ubuntu-24.04"
224+
cc: "gcc-14"
225+
cxx: "g++-14"
226+
otp: "27"
167227
cflags: "-Os"
168-
elixir_version: "1.14"
169-
compiler_pkgs: "gcc-12 g++-12"
228+
elixir_version: "1.17"
229+
compiler_pkgs: "gcc-14 g++-14"
170230

171-
# - os: "ubuntu-22.04"
172-
# cc: "clang-14"
173-
# cxx: "clang++-14"
174-
# otp: "24"
175-
# cflags: "-Os"
176-
# elixir_version: "1.14"
177-
# compiler_pkgs: "clang-14"
231+
- os: "ubuntu-24.04"
232+
cc: "clang-18"
233+
cxx: "clang++-18"
234+
otp: "27"
235+
cflags: "-Os"
236+
elixir_version: "1.17"
237+
compiler_pkgs: "clang-18"
178238

179239
# Additional 32 bits build
180240
- os: "ubuntu-20.04"
@@ -198,7 +258,7 @@ jobs:
198258
steps:
199259
# Setup
200260
- name: "Checkout repo"
201-
uses: actions/checkout@v3
261+
uses: actions/checkout@v4
202262
with:
203263
submodules: 'recursive'
204264

@@ -238,7 +298,7 @@ jobs:
238298
- name: "Build: create build dir"
239299
run: mkdir build
240300

241-
- uses: actions/cache@v3
301+
- uses: actions/cache@v4
242302
id: cache
243303
with:
244304
path: 'build/tests/**/*.beam'
@@ -262,7 +322,7 @@ jobs:
262322

263323
# Test
264324
- name: "Test: test-erlang"
265-
timeout-minutes: 10
325+
timeout-minutes: 15
266326
working-directory: build
267327
run: |
268328
./tests/test-erlang -s prime_smp
@@ -288,7 +348,7 @@ jobs:
288348
valgrind ./tests/test-structs
289349
290350
- name: "Test: test_estdlib.avm"
291-
timeout-minutes: 10
351+
timeout-minutes: 5
292352
working-directory: build
293353
run: |
294354
./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm

.github/workflows/build-docs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
sudo apt update -y
5757
DEBIAN_FRONTEND=noninteractive sudo apt install -y git cmake doxygen graphviz python3-pip python3-virtualenv python3-setuptools python3-stemmer wget
5858
59-
- uses: actions/cache@v3
59+
- uses: actions/cache@v4
6060
id: sphinx-cache
6161
with:
6262
path: /home/runner/python-env/sphinx
@@ -88,7 +88,7 @@ jobs:
8888
./rebar3 local install
8989
echo "/home/runner/.cache/rebar3/bin" >> ${GITHUB_PATH}
9090
91-
- uses: actions/checkout@v3
91+
- uses: actions/checkout@v4
9292
with:
9393
repository: ${{ vars.GITHUB_REPOSITORY }}
9494
fetch-depth: 0

0 commit comments

Comments
 (0)