Merge pull request #868 from bettio/prepare-v0.6.0-alpha.1 #1
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 2017-2023 Davide Bettio <[email protected]> | |
# | |
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later | |
# | |
name: Build Libraries | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
build-libraries: | |
runs-on: "ubuntu-22.04" | |
strategy: | |
fail-fast: false | |
steps: | |
- name: "Checkout repo" | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "24" | |
elixir-version: "1.11" | |
- name: "APT update" | |
run: sudo apt update -y | |
- name: "Install deps" | |
run: sudo apt install -y build-essential cmake gperf zlib1g-dev libssl-dev valgrind | |
# Builder info | |
- name: "System info" | |
run: | | |
echo "**uname:**" | |
uname -a | |
echo "**libc version:**" | |
ldd --version | |
echo "**C Compiler version:**" | |
cc --version | |
c++ --version | |
echo "**Linker version:**" | |
ld --version | |
echo "**CMake version:**" | |
cmake --version | |
echo "**OTP version:**" | |
cat $(dirname $(which erlc))/../releases/RELEASES || true | |
# Build | |
- name: "Build: create build dir" | |
run: mkdir build | |
- name: "Build: run cmake" | |
working-directory: build | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. | |
- name: "Build: run make" | |
working-directory: build | |
run: make | |
- name: "Build: run dialyzer" | |
working-directory: build | |
run: make dialyzer | |
- name: "Test: test_estdlib.avm" | |
timeout-minutes: 10 | |
working-directory: build | |
run: | | |
./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm | |
valgrind ./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm | |
- name: "Rename and write sha256sum" | |
working-directory: build | |
run: | | |
ATOMVMLIB_FILE=atomvmlib-${{ github.ref_name }}.avm | |
mv libs/atomvmlib.avm "libs/${ATOMVMLIB_FILE}" && | |
sha256sum "libs/${ATOMVMLIB_FILE}" > "libs/${ATOMVMLIB_FILE}.sha256" | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
fail_on_unmatched_files: true | |
files: | | |
build/libs/atomvmlib-${{ github.ref_name }}.avm | |
build/libs/atomvmlib-${{ github.ref_name }}.avm.sha256 |