Skip to content

Commit

Permalink
Change to reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy4495 committed Sep 5, 2023
1 parent ddd0cb0 commit 041b8ae
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 39 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/CheckMarkdownLinks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ on:
# Modify the cron time to a somewhat random day/time to avoid having all your repos running at the same time
# Run 4th day of every month at 4:41 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)
- cron: "37 4 4 * *"
workflow_dispatch:
inputs:
message:
description: Message to display in job summary
required: false
type: string

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
base-branch: main
use-verbose-mode: yes
# config file is used to flag HTTP result code 429 as a valid "alive" result
config-file: './.github/workflows/mlc_config.json'
name: call-markdown-link-check-workflow
uses: Andy4495/.github/.github/workflows/CheckMarkdownLinks.yml@main
with:
message: ${{ inputs.message }}

54 changes: 24 additions & 30 deletions .github/workflows/arduino-compile-sketches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,31 @@ name: Arduino Compile Sketches
on:
push:
workflow_dispatch:
inputs:
message:
description: Message to display in job summary
required: false
type: string

jobs:
compile-sketches:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Clone compile-sketches to get python version (using nektos/act locally)
if: ${{ env.ACT }}
run: cd /tmp; git clone 'https://github.com/arduino/compile-sketches'
- name: setup-python (when running locally for nektos/act compatibility)
if: ${{ env.ACT }}
uses: actions/setup-python@v4
with:
python-version-file: /tmp/compile-sketches/.python-version
- name: Install Poetry (when running locally for nektos/act compatibility)
if: ${{ env.ACT }}
uses: snok/install-poetry@v1
- name: Install pipx (when running locally for nektos/act compatibility)
if: ${{ env.ACT }}
run: pip install pipx
- uses: arduino/compile-sketches@v1
with:
fqbn: 'energia:msp430:MSP-EXP430G2553LP'
platforms: |
- name: 'energia:msp430'
version: latest
source-url: 'https://raw.githubusercontent.com/Andy4495/TI_Platform_Cores_For_Arduino/main/json/package_energia_minimal_MSP_107_index.json'
sketch-paths: |
- .
verbose: true
enable-warnings-report: true
libraries: |
- source-path: ./
strategy:
matrix:
include:
- arch: msp430
fqbn: 'energia:msp430:MSP-EXP430G2553LP'
platform-name: 'energia:msp430'
platform-sourceurl: 'https://raw.githubusercontent.com/Andy4495/TI_Platform_Cores_For_Arduino/main/json/package_energia_minimal_MSP_107_index.json'

name: call-compile-sketches-workflow
uses: Andy4495/.github/.github/workflows/arduino-compile-sketches.yml@main
with:
message: ${{ inputs.message }}
copyfile:
fqbn: ${{ matrix.fqbn }}
platform-name: ${{ matrix.platform-name }}
platform-sourceurl: ${{ matrix.platform-sourceurl }}
platform-version: latest
libraries: |
- source-path: ./

0 comments on commit 041b8ae

Please sign in to comment.