-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Attempt to build MCU binary package
For now with configs for stm32, but esp-idf variants (xtensa, riscv) also to be added.
- Loading branch information
Showing
1 changed file
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,10 @@ env: | |
MACOSX_DEPLOYMENT_TARGET: "11.0" | ||
# Keep in sync with features in nightly_snapshot.yaml, slint_tool_binary.yaml, api/node/Cargo.toml, and api/python/Cargo.toml | ||
SLINT_BINARY_FEATURES: "-DSLINT_FEATURE_BACKEND_LINUXKMS_NOSEAT=ON -DSLINT_FEATURE_BACKEND_WINIT=ON -DSLINT_FEATURE_RENDERER_FEMTOVG=ON -DSLINT_FEATURE_RENDERER_SKIA=ON -DSLINT_FEATURE_RENDERER_SOFTWARE=ON" | ||
SLINT_MCU_FEATURES: "-DSLINT_FEATURE_FREESTANDING=ON -DSLINT_FEATURE_RENDERER_SOFTWARE=ON" | ||
|
||
jobs: | ||
cmake_package: | ||
cmake_package_desktop: | ||
env: | ||
DYLD_FRAMEWORK_PATH: /Users/runner/work/slint/Qt/6.5.1/clang_64/lib | ||
QT_QPA_PLATFORM: offscreen | ||
|
@@ -70,3 +71,54 @@ jobs: | |
with: | ||
name: cpp_bin-${{ matrix.package_suffix }} | ||
path: ${{ runner.workspace }}/cppbuild/Slint-cpp-* | ||
|
||
cmake_package_mcu: | ||
env: | ||
CARGO_INCREMENTAL: false | ||
strategy: | ||
matrix: | ||
target: [thumbv7em-none-eabihf] | ||
host: [ubuntu-20.04, windows-2022, macOS-12] | ||
include: | ||
- os: ubuntu-20.04 | ||
package_suffix: linux | ||
- os: macOS-12 | ||
package_suffix: macos | ||
- os: windows-2022 | ||
package_suffix: windows | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install-linux-dependencies | ||
with: | ||
old-ubuntu: true | ||
- uses: ./.github/actions/setup-rust | ||
- uses: baptiste0928/cargo-install@v3 | ||
with: | ||
crate: cargo-about | ||
- name: Prepare licenses | ||
run: bash -x ../../scripts/prepare_binary_package.sh ../.. | ||
working-directory: api/cpp/ | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- name: Select MSVC (windows) | ||
run: | | ||
echo "CC=cl.exe" >> $GITHUB_ENV | ||
echo "CXX=cl.exe" >> $GITHUB_ENV | ||
if: matrix.os == 'windows-2022' | ||
- name: C++ Build | ||
uses: lukka/[email protected] | ||
with: | ||
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | ||
cmakeListsTxtPath: CMakeLists.txt | ||
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF ${{ env.SLINT_MCU_FEATURES }} " | ||
buildDirectory: ${{ runner.workspace }}/cppbuild | ||
buildWithCMakeArgs: "--config Release" | ||
- name: cpack | ||
working-directory: ${{ runner.workspace }}/cppbuild | ||
run: cpack -G TGZ -DCPACK_SYSTEM_NAME=${{ runner.os }}-${{ runner.arch }}-${{ matrix.target }} | ||
- name: "Upload C++ packages" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cpp_mcu_bin-${{ runner.os }}-${{ runner.arch }}-${{ matrix.target }} | ||
path: ${{ runner.workspace }}/cppbuild/Slint-cpp-* |