Skip to content

Commit fc49821

Browse files
committed
Merge pull request atomvm#517 from fadushin/fix-install-target
Install target fix This PR fixes the install target so that atomvm script gets properly deployed. In addition, the Linux and macOS workflows now exercise the install target. These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 985ea60 + 22ed9fb commit fc49821

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,10 @@ jobs:
8383
working-directory: build
8484
run: |
8585
./src/AtomVM ./tests/libs/alisp/test_alisp.avm
86+
87+
- name: "Install and smoke test"
88+
working-directory: build
89+
run: |
90+
export PATH="/usr/local/opt/erlang@${{ matrix.otp }}/bin:$PATH"
91+
sudo ninja install
92+
atomvm examples/erlang/hello_world.avm

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,9 @@ jobs:
258258
run: |
259259
./src/AtomVM ./tests/libs/alisp/test_alisp.avm
260260
valgrind ./src/AtomVM ./tests/libs/alisp/test_alisp.avm
261+
262+
- name: "Install and smoke test"
263+
working-directory: build
264+
run: |
265+
sudo PATH=${PATH} make install
266+
atomvm examples/erlang/hello_world.avm

src/platforms/generic_unix/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,8 @@ if (COVERAGE)
5858
endif()
5959

6060
install(TARGETS AtomVM DESTINATION lib/atomvm)
61+
install(
62+
FILES ${CMAKE_CURRENT_SOURCE_DIR}/atomvm
63+
DESTINATION bin
64+
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
65+
)

src/platforms/generic_unix/lib/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ endif()
6161
target_compile_definitions(libAtomVM${PLATFORM_LIB_SUFFIX} PUBLIC DYNLOAD_PORT_DRIVERS)
6262
target_link_libraries(libAtomVM${PLATFORM_LIB_SUFFIX} PUBLIC ${CMAKE_DL_LIBS})
6363

64-
install(
65-
FILES ${CMAKE_CURRENT_SOURCE_DIR}/atomvm
66-
DESTINATION bin
67-
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
68-
)
69-
7064
if (COVERAGE)
7165
include(CodeCoverage)
7266
append_coverage_compiler_flags_to_target(libAtomVM${PLATFORM_LIB_SUFFIX})

0 commit comments

Comments
 (0)