Skip to content

Commit

Permalink
Merge branch 'develop' into anti-aliasing
Browse files Browse the repository at this point in the history
  • Loading branch information
zwim authored Apr 29, 2024
2 parents 44c1530 + 0607210 commit 4c8da60
Show file tree
Hide file tree
Showing 27 changed files with 659 additions and 279 deletions.
62 changes: 37 additions & 25 deletions .github/workflows/test-EMULATOR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build OSW Emulator (Ubuntu)

on:
push:
paths_ignore: '["**/*.md", "**/scripts/screen_capture/**"]'
paths-ignore: ["**/*.md", "**/scripts/screen_capture/**"]
pull_request:
branches: [ master, develop ]
branches: [master, develop]

jobs:
check_skip:
Expand All @@ -15,8 +15,8 @@ jobs:
- id: skip_check
uses: fkirc/[email protected]
with:
concurrent_skipping: 'same_content_newer'
skip_after_successful_duplicate: 'true'
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"

build-EMULATOR:
runs-on: ubuntu-22.04
Expand All @@ -25,24 +25,36 @@ jobs:
strategy:
matrix:
build-configuration: [Debug, Release]
steps:
- name: Checkout repository and submodules
# uses: actions/checkout@v3 # incompatible with git lfs cache bandwidth calcs (https://github.com/actions/checkout/issues/165)
uses: nschloe/[email protected]
with:
submodules: recursive
lfs: 'true'
- name: Update packages
run: sudo apt-get update
- name: Install packages
run: sudo apt-get -y install gcc g++ cmake libsdl2-dev libsdl2-image-dev python3 python3-pip
- name: Install python packages
run: pip3 install --user -r scripts/requirements.txt
- name: Create build directory
run: mkdir build
- name: CMake ${{ matrix.build-configuration }}
run: cd build && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} ..
- name: Make
run: cd build && make -j $(nproc)
- name: Test
run: cd build && make test
steps:
# the following is incompatible with git lfs cache bandwidth calculations (https://github.com/actions/checkout/issues/165)
# -> we removed the following and replaced it with a cache-aware checkout
# - name: Checkout repository and submodules
# uses: actions/checkout@v3
# with:
# submodules: recursive
# lfs: 'true'
- name: Checkout repository and submodules
uses: nschloe/[email protected]
with:
submodules: recursive
- name: Update packages
run: sudo apt-get update
- name: Install packages
run: sudo apt-get -y install gcc g++ cmake libsdl2-dev libsdl2-image-dev python3 python3-pip
- name: Install python packages
run: pip3 install --user -r scripts/requirements.txt
- name: Create build directory
run: mkdir build
- name: CMake ${{ matrix.build-configuration }}
run: cd build && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} ..
- name: Make
run: cd build && make -j $(nproc)
- name: Test
run: cd build && make test
- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
build/Testing
66 changes: 31 additions & 35 deletions .github/workflows/test-FEATURE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build OSW-OS (Ubuntu, additional features)

on:
push:
paths_ignore: '["*.md", "**/scripts/screen_capture/**"]'
paths-ignore: ["*.md", "**/scripts/screen_capture/**"]
pull_request:
branches: [ master, develop ]
branches: [master, develop]

jobs:
check_skip:
Expand All @@ -15,20 +15,18 @@ jobs:
- id: skip_check
uses: fkirc/[email protected]
with:
concurrent_skipping: 'same_content_newer'
skip_after_successful_duplicate: 'true'
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"

Find-feature:
runs-on: ubuntu-latest
needs: check_skip
if: ${{ needs.check_skip.outputs.should_skip != 'true' }}
steps:
steps:
- name: Checkout repository and submodules
# uses: actions/checkout@v3 # incompatible with git lfs cache bandwidth calcs (https://github.com/actions/checkout/issues/165)
uses: nschloe/[email protected]
with:
submodules: recursive
lfs: 'true'
- id: get-flag
run: |
echo "feature=$(python3 .github/getWorkflowMatrix.py all_flags)" >> $GITHUB_OUTPUT
Expand All @@ -52,31 +50,29 @@ jobs:
model: ${{ fromJson(needs.Find-feature.outputs.default_model) }}
language: ${{ fromJson(needs.Find-feature.outputs.default_language) }}
steps:
- name: Checkout repository and submodules
# uses: actions/checkout@v3 # incompatible with git lfs cache bandwidth calcs (https://github.com/actions/checkout/issues/165)
uses: nschloe/[email protected]
with:
submodules: recursive
lfs: 'true'
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache PlatformIO
uses: actions/cache@v3
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
with:
python-version: '3.10'
- name: Install PlatformIO
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 }} feature ${{ matrix.feature }}
run: python3 .github/buildFirmware.py -l "${{ matrix.language }}" -m "${{ matrix.model }}" -f "${{ matrix.feature }}" -b debug
- name: Checkout repository and submodules
uses: nschloe/[email protected]
with:
submodules: recursive
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache PlatformIO
uses: actions/cache@v3
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
with:
python-version: "3.10"
- name: Install PlatformIO
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 }} feature ${{ matrix.feature }}
run: python3 .github/buildFirmware.py -l "${{ matrix.language }}" -m "${{ matrix.model }}" -f "${{ matrix.feature }}" -b debug
62 changes: 29 additions & 33 deletions .github/workflows/test-OS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"

jobs:
Find-feature:
runs-on: ubuntu-latest
steps:
steps:
- name: Checkout repository and submodules
# uses: actions/checkout@v3 # incompatible with git lfs cache bandwidth calcs (https://github.com/actions/checkout/issues/165)
uses: nschloe/[email protected]
with:
submodules: recursive
lfs: 'true'
- uses: dorny/[email protected]
id: filter
with:
Expand Down Expand Up @@ -45,34 +43,32 @@ jobs:
model: ${{ fromJson(needs.Find-feature.outputs.get-models) }}
language: ${{ fromJson(needs.Find-feature.outputs.get-languages) }}
steps:
- name: Checkout repository and submodules
# uses: actions/checkout@v3 # incompatible with git lfs cache bandwidth calcs (https://github.com/actions/checkout/issues/165)
uses: nschloe/[email protected]
with:
submodules: recursive
lfs: 'true'
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: platformio-${{ runner.os }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Checkout repository and submodules
uses: nschloe/[email protected]
with:
submodules: recursive
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: platformio-${{ runner.os }}
- name: Set up Python
uses: actions/setup-python@v4
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
- 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
- name: Compile language ${{ matrix.language }} model ${{ matrix.model }}
run: python3 .github/buildFirmware.py -l "${{ matrix.language }}" -m "${{ matrix.model }}" -b debug
- name: Compile language ${{ matrix.language }} model ${{ matrix.model }}
run: python3 .github/buildFirmware.py -l "${{ matrix.language }}" -m "${{ matrix.model }}" -b debug
78 changes: 37 additions & 41 deletions .github/workflows/test-OSW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Build OSW-OS (Ubuntu, all models)
on:
workflow_dispatch:
push:
paths_ignore: '["*.md", "**/scripts/screen_capture/**"]'
paths-ignore: ["*.md", "**/scripts/screen_capture/**"]
pull_request:
branches: [ master, develop ]
branches: [master, develop]

jobs:
check_skip:
Expand All @@ -16,20 +16,18 @@ jobs:
- id: skip_check
uses: fkirc/[email protected]
with:
concurrent_skipping: 'same_content_newer'
skip_after_successful_duplicate: 'true'
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"

Find-packages:
runs-on: ubuntu-latest
needs: check_skip
if: ${{ needs.check_skip.outputs.should_skip != 'true' }}
steps:
steps:
- name: Checkout repository and submodules
# uses: actions/checkout@v3 # incompatible with git lfs cache bandwidth calcs (https://github.com/actions/checkout/issues/165)
uses: nschloe/[email protected]
with:
submodules: recursive
lfs: 'true'
- uses: dorny/[email protected]
id: filter
with:
Expand Down Expand Up @@ -58,37 +56,35 @@ jobs:
model: ${{ fromJson(needs.Find-packages.outputs.models_matrix) }}
build-configuration: [debug, release]
steps:
- name: Checkout repository and submodules
# uses: actions/checkout@v3 # incompatible with git lfs cache bandwidth calcs (https://github.com/actions/checkout/issues/165)
uses: nschloe/[email protected]
with:
submodules: recursive
lfs: 'true'
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache PlatformIO
uses: actions/cache@v3
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
with:
python-version: '3.10'
- name: Install PlatformIO
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 "${{ matrix.build-configuration }}"
- name: Upload firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmwares
path: |
*.bin
- name: Checkout repository and submodules
uses: nschloe/[email protected]
with:
submodules: recursive
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache PlatformIO
uses: actions/cache@v3
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
with:
python-version: "3.10"
- name: Install PlatformIO
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 "${{ matrix.build-configuration }}"
- name: Upload firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmwares
path: |
*.bin
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ target_compile_definitions(emulator.run PUBLIC
# LOCALE="locales/en-US.h"
# Comment these as you wish...
OSW_FEATURE_STATS_STEPS
OSW_APPS_EXAMPLES=1
OSW_FEATURE_WEATHER
OSW_SERVICE_CONSOLE
OSW_APPS_EXAMPLES
GAME_SNAKE=1
GAME_BRICK_BREAKER=1
TOOL_FLASHLIGHT=1
Expand Down
Loading

0 comments on commit 4c8da60

Please sign in to comment.