Martin Ling 9c0a3e0244 CI: remove BUILD_TYPE environment variable.
We were only setting this to Release, so there is no current need for an
environment variable.

Removing it allows us to reuse some steps for Windows, where the syntax
to insert an environment variable is different.
2022-12-13 02:30:53 +00:00

124 lines
3.4 KiB
YAML

name: Build
on:
push:
pull_request:
# Run automatically every monday
schedule:
- cron: 1 12 * * 1
jobs:
host:
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest']
# Don't cancel all builds when one fails
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies (macOS)
run: brew install fftw
if: matrix.os == 'macos-latest'
- name: Install dependencies (Ubuntu)
run: |
sudo apt update
sudo apt install libfftw3-dev libusb-1.0-0-dev
if: matrix.os == 'ubuntu-latest'
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/host/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/host/build
run: cmake $GITHUB_WORKSPACE/host/ -DCMAKE_BUILD_TYPE=Release
- name: Build
working-directory: ${{runner.workspace}}/host/build
shell: bash
run: cmake --build . --config Release
- name: Create Build Environment (libhackrf)
run: cmake -E make_directory ${{runner.workspace}}/host/libhackrf/build
- name: Configure CMake (libhackrf)
shell: bash
working-directory: ${{runner.workspace}}/host/libhackrf/build
run: cmake $GITHUB_WORKSPACE/host/libhackrf/ -DCMAKE_BUILD_TYPE=Release
- name: Build (libhackrf)
working-directory: ${{runner.workspace}}/host/libhackrf/build
shell: bash
run: cmake --build . --config Release
- name: Install (libhackrf)
working-directory: ${{runner.workspace}}/host/libhackrf/build
shell: bash
run: |
sudo cmake --install . --config Release
- name: Create Build Environment (hackrf-tools)
run: cmake -E make_directory ${{runner.workspace}}/host/hackrf-tools/build
- name: Configure CMake (hackrf-tools)
shell: bash
working-directory: ${{runner.workspace}}/host/hackrf-tools/build
run: cmake $GITHUB_WORKSPACE/host/hackrf-tools/ -DCMAKE_BUILD_TYPE=Release
- name: Build (hackrf-tools)
working-directory: ${{runner.workspace}}/host/hackrf-tools/build
shell: bash
run: cmake --build . --config Release
firmware:
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest']
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O']
# Don't cancel all builds when one fails
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install dependencies (macOS)
run: |
brew tap armmbed/formulae
brew install arm-none-eabi-gcc dfu-util
pip3 install PyYAML
if: matrix.os == 'macos-latest'
- name: Install dependencies (Ubuntu)
run: |
sudo apt install dfu-util gcc-arm-none-eabi
if: matrix.os == 'ubuntu-latest'
- name: Build libopencm3
shell: bash
working-directory: ${{github.workspace}}/firmware/libopencm3/
run: make
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/firmware/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/firmware/build
run: cmake $GITHUB_WORKSPACE/firmware/ -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }}
- name: Build
working-directory: ${{runner.workspace}}/firmware/build
shell: bash
run: cmake --build . --config Release