Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use version 0.0.0 for nightly #9

Merged
merged 3 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@ jobs:
run: |
cmake --build --preset Debug



create_release:
#needs: [test_packages]
needs: [build_packages]
needs: [test_packages]
runs-on: ubuntu-22.04
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 1 addition & 3 deletions stm32h735g-dk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ set(SLINT_STYLE "fluent-light")
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

set(SLINT_TARGET_ARCHITECTURE thumbv7em-none-eabihf)
# Remove once 1.8.0 is out
set(SLINT_USE_NIGHTLY_VERSION TRUE)
find_package(Slint 1.8.0)
find_package(Slint 0.0.0)

set(DEFAULT_SLINT_EMBED_RESOURCES embed-for-software-renderer)

Expand Down
13 changes: 8 additions & 5 deletions stm32h735g-dk/cmake/FindSlint.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# is happening in an ESP-IDF cross-compilation environment and detect the architecture accordingly, otherwise
# `${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}` is used.
#
# `SLINT_USE_NIGHTLY_VERSION`: When `find_package(Slint)` is called with a version, then this module will
# `SLINT_USE_NIGHTLY_VERSION`: When `find_package(Slint)` is called with a version, then this module will
# attempt to download a pre-compiled binary from the nightly snapshot of Slint.

find_package(Slint ${Slint_FIND_VERSION} QUIET CONFIG)
Expand Down Expand Up @@ -60,15 +60,18 @@ if (NOT DEFINED Slint_FIND_VERSION)
endif()

set(slint_version "${Slint_FIND_VERSION}")
set(github_release "${slint_version}")

if (SLINT_USE_NIGHTLY_VERSION)
set(github_release "nightly")
if (Slint_FIND_VERSION VERSION_LESS_EQUAL 0.0.0)
set(SLINT_USE_NIGHTLY_VERSION TRUE)
# Set this to instruct the slint-compiler download to use the same release
set(SLINT_GITHUB_RELEASE "nightly" CACHE STRING "")
set(github_release "nightly")

else()
set(github_release "${Slint_FIND_VERSION}")
endif()

set(prebuilt_archive_filename "Slint-cpp-${slint_version}-${SLINT_TARGET_ARCHITECTURE}.tar.gz")
set(prebuilt_archive_filename "Slint-cpp-${github_release}-${SLINT_TARGET_ARCHITECTURE}.tar.gz")
set(download_target_path "${CMAKE_BINARY_DIR}/slint-prebuilt/")
set(download_url "https://github.com/slint-ui/slint/releases/download/${github_release}/${prebuilt_archive_filename}")

Expand Down
4 changes: 1 addition & 3 deletions stm32h747i-disco/CM7/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ set(SLINT_STYLE "fluent-light")
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")

set(SLINT_TARGET_ARCHITECTURE thumbv7em-none-eabihf)
# Remove once 1.8.0 is out
set(SLINT_USE_NIGHTLY_VERSION TRUE)
find_package(Slint 1.8.0)
find_package(Slint 0.0.0)

set(DEFAULT_SLINT_EMBED_RESOURCES embed-for-software-renderer)

Expand Down
15 changes: 8 additions & 7 deletions stm32h747i-disco/cmake/FindSlint.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# is happening in an ESP-IDF cross-compilation environment and detect the architecture accordingly, otherwise
# `${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}` is used.
#
# `SLINT_USE_NIGHTLY_VERSION`: When `find_package(Slint)` is called with a version, then this module will
# `SLINT_USE_NIGHTLY_VERSION`: When `find_package(Slint)` is called with a version, then this module will
# attempt to download a pre-compiled binary from the nightly snapshot of Slint.

find_package(Slint ${Slint_FIND_VERSION} QUIET CONFIG)
Expand Down Expand Up @@ -59,16 +59,17 @@ if (NOT DEFINED Slint_FIND_VERSION)
return()
endif()

set(slint_version "${Slint_FIND_VERSION}")
set(github_release "${slint_version}")

if (SLINT_USE_NIGHTLY_VERSION)
set(github_release "nightly")
if (Slint_FIND_VERSION VERSION_LESS_EQUAL 0.0.0)
set(SLINT_USE_NIGHTLY_VERSION TRUE)
# Set this to instruct the slint-compiler download to use the same release
set(SLINT_GITHUB_RELEASE "nightly" CACHE STRING "")
set(github_release "nightly")

else()
set(github_release "${Slint_FIND_VERSION}")
endif()

set(prebuilt_archive_filename "Slint-cpp-${slint_version}-${SLINT_TARGET_ARCHITECTURE}.tar.gz")
set(prebuilt_archive_filename "Slint-cpp-${github_release}-${SLINT_TARGET_ARCHITECTURE}.tar.gz")
set(download_target_path "${CMAKE_BINARY_DIR}/slint-prebuilt/")
set(download_url "https://github.com/slint-ui/slint/releases/download/${github_release}/${prebuilt_archive_filename}")

Expand Down
Loading