Skip to content

Commit

Permalink
Merge pull request #452 from miek/actions
Browse files Browse the repository at this point in the history
Migrate to GitHub Actions
  • Loading branch information
mossmann authored Jul 4, 2021
2 parents 9234815 + 388cd9d commit 2c487f6
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 93 deletions.
104 changes: 104 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Build

on:
push:
pull_request:

# Run automatically every monday
schedule:
- cron: 1 12 * * 1

env:
BUILD_TYPE: Release

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

- uses: actions/checkout@v2
name: Fetch libbtbb
with:
repository: 'greatscottgadgets/libbtbb'
path: 'libbtbb'

- 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: (libbtbb) Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/libbtbb/build

- name: (libbtbb) Configure CMake
shell: bash
working-directory: ${{github.workspace}}/libbtbb/build
run: cmake $GITHUB_WORKSPACE/libbtbb/ -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: (libbtbb) Build
working-directory: ${{github.workspace}}/libbtbb/build
shell: bash
run: cmake --build . --config $BUILD_TYPE

- name: (libbtbb) Install
working-directory: ${{github.workspace}}/libbtbb/build
shell: bash
run: sudo cmake --install . --config $BUILD_TYPE

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/host/build

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/host/build
run: cmake $GITHUB_WORKSPACE/host/ -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Build
working-directory: ${{github.workspace}}/host/build
shell: bash
run: cmake --build . --config $BUILD_TYPE

firmware:
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
with:
submodules: true

- name: Install dependencies (macOS)
run: |
brew tap armmbed/formulae
brew install arm-none-eabi-gcc dfu-util
pip 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
working-directory: ${{github.workspace}}/firmware
shell: bash
run: make

93 changes: 0 additions & 93 deletions .travis.yml

This file was deleted.

0 comments on commit 2c487f6

Please sign in to comment.