Skip to content

Allow for less opcodes based on version of OTP compiler #2185

Allow for less opcodes based on version of OTP compiler

Allow for less opcodes based on version of OTP compiler #2185

Workflow file for this run

#
# Copyright 2022 Paul Guyot <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#
name: STM32 Build
on:
push:
paths:
- '.github/workflows/stm32-build.yaml'
- 'CMakeLists.txt'
- 'src/platforms/stm32/**'
- 'src/libAtomVM/**'
pull_request:
paths:
- '.github/workflows/stm32-build.yaml'
- 'CMakeLists.txt'
- 'src/platforms/stm32/**'
- 'src/libAtomVM/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/main' && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
stm32:
runs-on: ubuntu-24.04
steps:
- uses: actions/cache@v4
id: builddeps-cache
with:
path: |
/home/runner/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi
/home/runner/libopencm3
key: ${{ runner.os }}-build-deps
- uses: erlef/setup-beam@v1
with:
otp-version: "27"
hexpm-mirrors: |
https://builds.hex.pm
https://repo.hex.pm
https://cdn.jsdelivr.net/hex
- name: Install arm-embedded toolchain
if: ${{ steps.builddeps-cache.outputs.cache-hit != 'true' }}
working-directory: /home/runner
run: |
set -euo pipefail
cd /home/runner
wget https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz \
--output-document=$RUNNER_TEMP/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz
tar xJf $RUNNER_TEMP/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz
pwd && ls
- name: Checkout and build libopencm3
if: ${{ steps.builddeps-cache.outputs.cache-hit != 'true' }}
working-directory: /home/runner
run: |
set -euo pipefail
cd /home/runner
test -d libopencm3 && rm -fr libopencm3
export PATH=/home/runner/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi/bin:${PATH}
git clone https://github.com/libopencm3/libopencm3.git -b v0.8.0
cd libopencm3
make
- name: "apt update"
run: sudo apt update
- name: "Install deps"
run: sudo apt install -y cmake gperf
- name: Checkout repo
uses: actions/checkout@v4
- name: Build
shell: bash
working-directory: ./src/platforms/stm32/
run: |
set -euo pipefail
export PATH=/home/runner/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi/bin:${PATH}
mkdir build
cd build
# -DAVM_WARNINGS_ARE_ERRORS=ON
cmake .. -DCMAKE_TOOLCHAIN_FILE=cmake/arm-toolchain.cmake -DLIBOPENCM3_DIR=/home/runner/libopencm3
make -j