Skip to content

ci: add github actions using amurzeau/stm32cubeclt repo for the compiler #6

ci: add github actions using amurzeau/stm32cubeclt repo for the compiler

ci: add github actions using amurzeau/stm32cubeclt repo for the compiler #6

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: main
# Controls when the workflow will run
# Triggers the workflow on push or pull request events
on: [push, pull_request, workflow_dispatch]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Linux build
linux:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0
# Checks-out STM32 compiler
- uses: actions/checkout@v3
with:
repository: amurzeau/stm32cubeclt
path: stm32cubeclt
fetch-depth: 1
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build cmake
sudo mkdir -p /opt/st
sudo ln -s ${GITHUB_WORKSPACE}/stm32cubeclt /opt/st/stm32cubeclt
# Runs a set of commands using the runners shell
- name: Build
run: |
git submodule -q update --init --recursive
mkdir build
cmake -S . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE=cmake/gcc-arm-none-eabi.cmake
cmake --build build --target package --config Release
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
# Artifact name
name: "damc_stm32f723disco" # optional, default is artifact
# A file, directory or wildcard pattern that describes what to upload
path: build/*.zip
- name: Publish
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "build/*.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}