Skip to content

Commit

Permalink
attempt at CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ADM228 committed Jul 22, 2024
1 parent c9ffb91 commit eb38629
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/actions/cache_avra/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Cache avra
description: Caches avra and builds it from source if missing
inputs:
avraRef:
description: "avra Git Ref (used to checkout a fixed version)"
required: false
default: "master"
avraPath:
description: "avra path to cache"
required: false
default: ${{ github.workspace }}/opt/avra
runs:
using: "composite"
steps:
# Cache avra
- uses: actions/cache@v4
id: cache_avra
with:
path: ${{ inputs.avraPath }}
key: ${{ runner.os }}-avra-${{ inputs.avraRef }}-${{ hashFiles('.github/actions/cache_avra/*') }}
# Checkout avra
- uses: actions/checkout@v4
if: steps.cache_avra.outputs.cache-hit != 'true'
with:
repository: Ro5bert/avra
ref: ${{ inputs.avraRef }}
path: './avra'
# Build avra
- if: steps.cache_avra.outputs.cache-hit != 'true'
run: |
cd avra
PREFIX=${{ inputs.avraPath }} make
PREFIX=${{ inputs.avraPath }} make install
shell: bash
23 changes: 23 additions & 0 deletions .github/workflows/firmware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: ATtiny85APU assembly

on: [push]

jobs:
build_rom:
runs-on: ubuntu-latest
name: Compile ROM
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache avra
uses: ./.github/actions/avra
- name: Set path
run: |
echo "${{ github.workspace }}/opt/avra/bin" >> $GITHUB_PATH
- name: Build the firmware
run: make
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: main.hex
path: bin/avr/main.hex

0 comments on commit eb38629

Please sign in to comment.