Skip to content

Commit

Permalink
Merge pull request #56 from dmadison/ci
Browse files Browse the repository at this point in the history
Update CI Versions
  • Loading branch information
dmadison committed Oct 13, 2021
2 parents b24a46c + 6c9edce commit a84bdda
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -3,8 +3,8 @@ name: build
on: [push, pull_request, workflow_dispatch]

env:
IDE_VERSION: 1.8.13
TEENSY_VERSION: 153
IDE_VERSION: 1.8.16
TEENSY_VERSION: 155
IDE_LOCATION: /usr/local/share/arduino

jobs:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
sudo python ./.github/workflows/remove_teensyloader.py $IDE_LOCATION/hardware/teensy/avr/platform.txt
- name: Install Libraries for Examples
run: arduino --install-library "Nintendo Extension Ctrl:0.8.1"
run: arduino --install-library "Nintendo Extension Ctrl:0.8.3"

- name: Build Examples
run: |
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/remove_teensyloader.py
@@ -1,16 +1,24 @@
#!/usr/bin/python

import sys
import re

filepath = sys.argv[1]
lines = []
filepath = sys.argv[1] # path of the file to parse
lines = [] # list of lines from the file
removed = False # flag for if the line was removed from the file

with open(filepath, 'r') as f:
lines = f.readlines()

with open(filepath, 'w') as f:
# matching "postbuild" hooks of any number which call the "teensy_post_compile" application
pattern = re.compile("recipe\.hooks\.postbuild\.[0-9]\.pattern=\"{compiler\.path}teensy_post_compile\"")
for line in lines:
if not line.startswith("recipe.hooks.postbuild.3.pattern=\"{compiler.path}teensy_post_compile\""): # remove post-compile trigger
if not pattern.match(line):
f.write(line)
else:
print("Removing line '{}'".format(line.strip('\n')))
removed = True

if not removed:
raise RuntimeError("Did not find a matching line to remove in \"{}\"".format(filepath))

0 comments on commit a84bdda

Please sign in to comment.