Skip to content

Commit

Permalink
🔊 Add platform messages in build_demos
Browse files Browse the repository at this point in the history
- libhal_build_demos now prints the environment variables for
  LIBHAL_PLATFORM and LIBHAL_PLATFORM_LIBRARY.
- Remove revoke and other unneedded sections from ci.yml
- ⬆️ bump version to 4.0.2
  • Loading branch information
kammce committed Mar 4, 2024
1 parent 5af89a0 commit 034d107
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 33 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,13 @@ name: 🚀 deploy
on:
workflow_dispatch:
pull_request:
release:
types:
- published
- deleted
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-22.04
if: github.event.action != 'deleted'
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -61,28 +56,3 @@ jobs:
- name: 🆙 Upload package to `libhal-trunk` repo
if: startsWith(github.ref, 'refs/tags/')
run: conan upload "libhal-cmake-util/*" --confirm -r=libhal-trunk

revoke:
runs-on: ubuntu-22.04
if: github.event.action == 'deleted'
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0

- name: 📥 Install CMake & Conan
run: pip3 install cmake conan==2.0.9

- name: 📡 Add `libhal-trunk` conan remote
run: conan remote add libhal-trunk
https://libhal.jfrog.io/artifactory/api/conan/trunk-conan

- name: 📡 Sign into JFrog Artifactory
env:
API_KEY: ${{ secrets.JFROG_LIBHAL_TRUNK_API_KEY }}
JFROG_USER: ${{ secrets.JFROG_LIBHAL_TRUNK_USER }}
run: conan remote login -p $API_KEY libhal $JFROG_USER

- name: 🚮 Pulling package version ${{ github.ref_name }} from `libhal`
run: conan remove "libhal-cmake-util/${{ github.event.release.tag_name }}" --confirm -r=libhal
9 changes: 7 additions & 2 deletions cmake/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,15 @@ function(libhal_build_demos)
if(NOT DEFINED ENV{LIBHAL_PLATFORM} OR
NOT DEFINED ENV{LIBHAL_PLATFORM_LIBRARY})
message(FATAL_ERROR
"Both LIBHAL_PLATFORM and LIBHAL_PLATFORM_LIBRARY environment variables "
"must be defined. Make sure you are using the correct profile!")
"${LIBHAL_TITLE}: Both LIBHAL_PLATFORM and LIBHAL_PLATFORM_LIBRARY "
"environment variables must be defined. Make sure you are using the "
"correct profile!")
endif()

message(STATUS "${LIBHAL_TITLE}: LIBHAL_PLATFORM = $ENV{LIBHAL_PLATFORM}")
message(STATUS "${LIBHAL_TITLE}: LIBHAL_PLATFORM_LIBRARY = "
"libhal-$ENV{LIBHAL_PLATFORM}")

find_package(libhal-$ENV{LIBHAL_PLATFORM_LIBRARY} REQUIRED)

foreach(PACKAGE ${DEMO_ARGS_PACKAGES})
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class libhal_cmake_util_conan(ConanFile):
name = "libhal-cmake-util"
version = "4.0.1"
version = "4.0.2"
license = "Apache-2.0"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://libhal.github.io/libhal-armcortex"
Expand Down

0 comments on commit 034d107

Please sign in to comment.