diff --git a/.github/workflows/build-and-upload.yml b/.github/workflows/build-and-upload.yml deleted file mode 100644 index 64a5fca782d..00000000000 --- a/.github/workflows/build-and-upload.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: build and upload - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # 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@v2 - - # Use embedded toolchain - - uses: numworks/setup-arm-toolchain@2020-q4 - - - name: Install BMDA dependencies - run: sudo apt-get -y install libftdi1-dev libhidapi-dev - - # Runs a single command using the runners shell - - name: Build all platform firmwares and Linux BMDA - run: make all_platforms - - - name: Archive firmware build artifacts as a zip - uses: actions/upload-artifact@v2.2.4 - with: - name: blackmagic-firmware.zip - path: src/artifacts/* - if-no-files-found: error diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml deleted file mode 100644 index 18c5d5f24cd..00000000000 --- a/.github/workflows/build-pr.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: build PR - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the main branch - pull_request: - branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # 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@v2 - - # Use embedded toolchain - - uses: numworks/setup-arm-toolchain@2020-q4 - - # Build all the firmwares - - name: Build all platform firmwares and BMP only BMPA - run: make all_platforms HOSTED_BMP_ONLY=1 - - - name: Clean - run: make clean - - - name: Install BMDA dependencies - run: sudo apt-get -y install libftdi1-dev libhidapi-dev - - - name: Build full BMDA binary - run: make PROBE_HOST=hosted diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000000..176e3660043 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,74 @@ +name: build + +on: + push: + branches: + - master + paths: + - 'src/**' + - 'lib/**' + - 'crossfile/**' + 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/checkout@v3.0.2 + with: + submodules: true + + - name: Build Depency + run: make -C libopencm3 lib/stm32/f1 lib/stm32/f4 lib/lm4f + + - name: Build + uses: BSFishy/meson-build@v1.0.3 + 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/checkout@v3.0.2 + with: + submodules: true + + - name: Build Depency + run: make -C libopencm3 lib/stm32/f1 lib/stm32/f4 lib/lm4f + + - name: Build + uses: BSFishy/meson-build@v1.0.3 + 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 diff --git a/crossfile/arm-none-eabi.ini b/crossfile/arm-none-eabi.ini index b726392ad3a..e850e0ed8bf 100644 --- a/crossfile/arm-none-eabi.ini +++ b/crossfile/arm-none-eabi.ini @@ -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' diff --git a/meson.build b/meson.build index d60d6b37a11..0663c8852b2 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,6 @@ project('Black Magic Firmware', 'c', default_options: [ 'optimization=s', 'debug=false', - # 'debug=false', # 'warning_level=3', # 'werror=true', ],