forked from lancaster-university/codal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions CI to build main.cpp (lancaster-university#3)
* Add GH Actions CI to build in all OS. * Remove/add/fix function declarations in Tests.h
- Loading branch information
1 parent
dde134c
commit 8ca9561
Showing
6 changed files
with
77 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build CODAL | ||
|
||
on: | ||
push: | ||
branches: '*' | ||
pull_request: | ||
branches: '*' | ||
schedule: | ||
# Runs every working day at 8 am | ||
- cron: '0 8 * * 1-5' | ||
|
||
jobs: | ||
build-py-script: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-16.04, macos-10.15, windows-2016] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
name: build.py ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install toolchain (Ubuntu) | ||
if: runner.os == 'Linux' | ||
run: sh ./.github/workflows/scripts/install-toolchain-ubuntu.sh | ||
- name: Install toolchain (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
.\.github\workflows\scripts\install-toolchain-win.ps1 | ||
echo "::add-path::${env:GITHUB_WORKSPACE}" | ||
- name: Install toolchain (macOS) | ||
if: runner.os == 'macOS' | ||
run: sh ./.github/workflows/scripts/install-toolchain-mac.sh | ||
- name: Check Versions | ||
run: | | ||
arm-none-eabi-gcc --version | ||
cmake --version | ||
ninja --version | ||
srec_cat --version | ||
- name: Build using build.py | ||
run: python build.py | ||
- name: Upload hex file | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: build-py-${{ matrix.os }} | ||
path: MICROBIT.hex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
set -x | ||
|
||
# Simply install everything via homebrew | ||
brew tap ArmMbed/homebrew-formulae | ||
brew install arm-none-eabi-gcc | ||
brew install cmake | ||
brew install ninja | ||
brew install srecord |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
set -x | ||
|
||
# Add apt repositories for Arm GCC and CMake | ||
sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa | ||
sudo add-apt-repository -y ppa:adrozdoff/cmake | ||
sudo apt-get update -qq | ||
# Simply install everything via apt | ||
sudo apt-get install -y gcc-arm-embedded | ||
sudo apt-get install -y cmake | ||
sudo apt-get install -y ninja-build | ||
sudo apt-get install -y srecord |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Use chocolatey to install Arm GCC, CMake, and Ninja | ||
choco install gcc-arm-embedded | ||
choco install cmake | ||
choco install ninja | ||
# Install srec by downloading it and unzipping into the cwd | ||
C:\msys64\usr\bin\wget.exe -O srecord.zip https://sourceforge.net/projects/srecord/files/srecord-win32/1.64/srecord-1.64-win32.zip/download | ||
Expand-Archive -Force srecord.zip . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters