Skip to content

Commit

Permalink
updates to github actions
Browse files Browse the repository at this point in the history
add release action
  • Loading branch information
pwittich committed Apr 26, 2021
1 parent cacc6e7 commit 3f45cfd
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ master ]

# note that I need to manually set the path for the arm-none-eabi-gcc exe
# after it comes out of the cache. I don't understand why I need to do that.

jobs:
build-gcc:

Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
tagged_release:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v2
- name: Check cache for Embedded Arm Toolchain arm-none-eabi-gcc
id: cache-toolchain
uses: actions/cache@v2
env:
cache-name: cache-toolchain-10-2020-q4
with:
path: ${{ runner.temp }}/arm-none-eabi
key: ${{ runner.os }}-buildv1-${{ env.cache-name }}
restore-keys: ${{ runner.os }}-buildv1-${{ env.cache-name }}

- name: Install Embedded Arm Toolchain arm-none-eabi-gcc
if: steps.cache-toolchain.outputs.cache-hit != 'true' # Install toolchain if not found in cache
uses: fiam/[email protected]
with:
release: '10-2020-q4' # The arm-none-eabi-gcc release to use.
# Directory to unpack GCC to. Defaults to a temporary directory.
directory: ${{ runner.temp }}/arm-none-eabi
- name: FreeRTOS download
run: |
cd ${{runner.temp}}
mkdir freertos-lts
cd freertos-lts
curl -L -o freertos_code.zip https://github.com/FreeRTOS/FreeRTOS-LTS/releases/download/202012.01-LTS/FreeRTOSv202012.01-LTS.zip
unzip -q freertos_code.zip
echo "FREERTOS_ROOT=`pwd`/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel" >> $GITHUB_ENV
export FREERTOS_ROOT=`pwd`/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel
echo $FREERTOS_ROOT
pwd
- name: make with GCC
run: |
export PATH=${PATH}:$HOME/work/_temp/arm-none-eabi/bin:
make
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
- projects/cm_mcu/gcc/cm_mcu*.axf
- projects/cm_mcu/gcc/cm_mcu*.bin
- projects/boot_loader/gcc/bl_main.axf
- projects/boot_loader/gcc/bl_main.bin

0 comments on commit 3f45cfd

Please sign in to comment.