Repository navigation
Merge pull request #219 from bitcoin3us/fix/restore-native-viper-deco… #37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build LVGL MicroPython for macOS Intel | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: # allow manual workflow starts | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: macos-15-intel | |
| timeout-minutes: 60 | |
| env: | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| HOMEBREW_NO_ANALYTICS: 1 | |
| LDFLAGS: -L/usr/local/opt/libffi/lib | |
| CPPFLAGS: -I/usr/local/opt/libffi/include | |
| PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_BASEDIR: ${{ github.workspace }} | |
| CCACHE_COMPILERCHECK: content | |
| CCACHE_NOHASHDIR: true | |
| steps: | |
| - name: Checkout repository with submodules | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies via Homebrew | |
| run: | | |
| xcode-select --install || true # already installed on github | |
| brew install pkg-config libffi ninja make SDL2 ccache | |
| - name: Restore compiler cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: .ccache | |
| key: ccache-v1-${{ runner.os }}-${{ runner.arch }}-macos-intel-${{ github.sha }} | |
| restore-keys: | | |
| ccache-v1-${{ runner.os }}-${{ runner.arch }}-macos-intel- | |
| - name: Configure compiler cache | |
| run: | | |
| echo "$(brew --prefix ccache)/libexec" >> "$GITHUB_PATH" | |
| ccache --max-size 1G | |
| ccache --zero-stats | |
| - name: Show version numbers | |
| run: | | |
| xcodebuild -version | |
| clang --version | |
| - name: Extract OS version | |
| id: version | |
| run: | | |
| OS_VERSION=$(grep "release = " internal_filesystem/lib/mpos/build_info.py | cut -d "=" -f 2 | cut -d "#" -f 1 | tr -d " " | tr -d '"') | |
| echo "OS_VERSION=$OS_VERSION" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $OS_VERSION" | |
| - name: Build LVGL MicroPython for macOS dev | |
| run: | | |
| ./scripts/build_mpos.sh macOS | |
| cp lvgl_micropython/build/lvgl_micropy_macOS lvgl_micropython/build/MicroPythonOS_intel_macOS_${{ steps.version.outputs.OS_VERSION }}.bin | |
| - name: Upload built binary as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: MicroPythonOS_intel_macOS_${{ steps.version.outputs.OS_VERSION }}.bin | |
| path: lvgl_micropython/build/MicroPythonOS_intel_macOS_${{ steps.version.outputs.OS_VERSION }}.bin | |
| retention-days: 7 | |
| - name: Run syntax tests on macOS | |
| run: | | |
| ./tests/syntax.sh | |
| - name: Run unit tests on macOS | |
| run: | | |
| ./scripts/test_runner.py | |
| - name: Show compiler cache statistics | |
| if: always() | |
| run: ccache --show-stats |