Skip to content

Commit

Permalink
Fix broken workflows due to SWIG install on Mac-OS (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmicro authored May 19, 2024
2 parents 0607210 + bb9ac21 commit 5004a75
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 30 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/astyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.repository == 'Open-Smartwatch/open-smartwatch-os' }}
steps:
- uses: actions/checkout@v1
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1
with:
# submodules: recursive # do not access any submodules to not accidentially modify them
ref: ${{ github.head_ref }}
- name: astyle
uses: addnab/docker-run-action@v3
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test-EMULATOR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.2.0
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: "true" # in a PR with two runs (push+merge), the latter will cancel the first and run instead
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"

Expand All @@ -34,7 +35,7 @@ jobs:
# submodules: recursive
# lfs: 'true'
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1.2.1
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- name: Update packages
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/test-FEATURE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.2.0
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: "true" # in a PR with two runs (push+merge), the latter will cancel the first and run instead
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"

Expand All @@ -24,7 +25,7 @@ jobs:
if: ${{ needs.check_skip.outputs.should_skip != 'true' }}
steps:
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1.2.1
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- id: get-flag
Expand All @@ -51,23 +52,23 @@ jobs:
language: ${{ fromJson(needs.Find-feature.outputs.default_language) }}
steps:
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1.2.1
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache PlatformIO
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.platformio
key: platformio-${{ runner.os }}
- name: Install swig
run: sudo apt-get update && sudo apt-get -y install swig
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install PlatformIO
Expand Down
31 changes: 17 additions & 14 deletions .github/workflows/test-OS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1.2.1
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- uses: dorny/paths-filter@v2.11.1
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
Expand Down Expand Up @@ -44,31 +44,34 @@ jobs:
language: ${{ fromJson(needs.Find-feature.outputs.get-languages) }}
steps:
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1.2.1
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache PlatformIO
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.platformio
key: platformio-${{ runner.os }}

- name: Install swig on Linux
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get -y install swig
- name: Install swig on Mac OS
if: matrix.os == 'macos-latest'
run: brew install swig

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install PlatformIO
shell: bash
run: |
apt update && apt -y install swig
python -m pip install --upgrade pip
pip install --upgrade platformio
mv include/config.h.example include/config.h
run: python -m pip install --upgrade pip && pip install --upgrade platformio
- name: Rename config
run: mv include/config.h.example include/config.h
- name: Compile language ${{ matrix.language }} model ${{ matrix.model }}
run: python3 .github/buildFirmware.py -l "${{ matrix.language }}" -m "${{ matrix.model }}" -b debug
16 changes: 9 additions & 7 deletions .github/workflows/test-OSW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ jobs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.2.0
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: "true" # in a PR with two runs (push+merge), the latter will cancel the first and run instead
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"

Expand All @@ -25,10 +26,10 @@ jobs:
if: ${{ needs.check_skip.outputs.should_skip != 'true' }}
steps:
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1.2.1
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- uses: dorny/paths-filter@v2.11.1
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
Expand All @@ -46,6 +47,7 @@ jobs:
outputs:
languages_matrix: ${{ steps.get-languages.outputs.languages_matrix }}
models_matrix: ${{ steps.get-models.outputs.models_matrix }}

build-OSW:
needs: Find-packages
runs-on: ubuntu-latest
Expand All @@ -57,23 +59,23 @@ jobs:
build-configuration: [debug, release]
steps:
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1.2.1
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache PlatformIO
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.platformio
key: platformio-${{ runner.os }}
- name: Install swig
run: sudo apt-get update && sudo apt-get -y install swig
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install PlatformIO
Expand Down

0 comments on commit 5004a75

Please sign in to comment.