Skip to content

Commit

Permalink
github: meson build workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Silva <[email protected]>
  • Loading branch information
perigoso committed Jun 9, 2022
1 parent c94c517 commit 642b75b
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 92 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/build-and-upload.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/build-pr.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: build

on: [push, pull_request]
branches:
- master
paths:
- 'src/**'
- 'lib/**'
- 'crossfile/**'

jobs:
compile-probes:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
probe:
- native
- stlink
- swlink
- launchpad-icdi
- hydrabus
- f4discovery
- blackpillv2
- 96b_carbon
steps:
- name: Setup Toolchain
uses: numworks/setup-arm-toolchain@2021-10

- name: Checkout
uses: actions/[email protected]
with:
submodules: true

- name: Build Depency
run: make -C libopencm3 lib/stm32/f1 lib/stm32/f4 lib/lm4f

- name: Build
uses: BSFishy/[email protected]
with:
action: build
directory: build/${{ matrix.probe }}
setup-options: --cross-file crossfile/arm-none-eabi.ini -Dprobe=${{ matrix.probe }} -Dtargets=[]
meson-version: 0.58.0

compile-targets:
runs-on: ubuntu-latest
steps:
- name: Setup Toolchain
uses: numworks/setup-arm-toolchain@2021-10

- name: Checkout
uses: actions/[email protected]
with:
submodules: true

- name: Build Depency
run: make -C libopencm3 lib/stm32/f1 lib/stm32/f4 lib/lm4f

- name: Build
uses: BSFishy/[email protected]
with:
action: build
directory: build/targets
setup-options: --cross-file crossfile/arm-none-eabi.ini -Dtargets=cortexa,cortexm,efm,lpc,nrf,nxp,rp,sam,stm,ti
meson-version: 0.58.0
22 changes: 8 additions & 14 deletions crossfile/arm-none-eabi.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
[constants]
# this allows easy overridding of the defaults
gcc_path = ''
gcc_prefix = 'arm-none-eabi-'
gcc_base = gcc_path / gcc_prefix

[binaries]
c = gcc_base + 'gcc'
ld = gcc_base + 'gcc'
ar = gcc_base + 'ar'
nm = gcc_base + 'nm'
objcopy = gcc_base + 'objcopy'
objdump = gcc_base + 'objdump'
strip = gcc_base + 'strip'
size = gcc_base + 'size'
c = 'arm-none-eabi-gcc'
ld = 'arm-none-eabi-gcc'
ar = 'arm-none-eabi-ar'
nm = 'arm-none-eabi-nm'
objcopy = 'arm-none-eabi-objcopy'
objdump = 'arm-none-eabi-objdump'
strip = 'arm-none-eabi-strip'
size = 'arm-none-eabi-size'
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ project('Black Magic Firmware', 'c',
default_options: [
'optimization=s',
'debug=false',
# 'debug=false',
# 'warning_level=3',
# 'werror=true',
],
Expand Down

0 comments on commit 642b75b

Please sign in to comment.