Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fix(ci): link the SDK CMake example and install editor native libs
CMake ignored link_directories placed after add_executable, so the
example could not find libastraweave_sdk. Attach the library directory
to the target. The editor job also needs ALSA and the rest of the
native packages the engine build scripts probe.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
  • Loading branch information
cursoragent and lazyxeon committed Oct 14, 2026
commit 05c2bff0ecda3660aa70418a8fb40587a338cca7
13 changes: 6 additions & 7 deletions .github/workflows/editor-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y \
libxcb-shape0-dev \
libxcb-xfixes0-dev \
libxkbcommon-dev \
libegl1-mesa-dev \
libwayland-dev \
libudev-dev \
pkg-config
build-essential pkg-config cmake \
libx11-dev libxi-dev libxcursor-dev libxrandr-dev libxinerama-dev \
libxkbcommon-dev libxkbcommon-x11-dev libx11-xcb-dev \
libxcb1-dev libxcb-randr0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-xkb-dev \
libgl1-mesa-dev libegl1-mesa-dev wayland-protocols libwayland-dev \
libasound2-dev libpulse-dev libudev-dev

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.89.0
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/sdk-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- uses: dtolnay/rust-toolchain@1.89.0
- name: MSVC developer environment
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Build SDK
run: cargo build -p astraweave-sdk --release
- name: Install cbindgen
Expand Down Expand Up @@ -98,9 +98,13 @@
cmake_minimum_required(VERSION 3.15)
project(aw_cmake_example C)
add_executable(aw_cmake_example main.c)
include_directories(${CMAKE_SOURCE_DIR}/..)
link_directories(${CMAKE_SOURCE_DIR}/../target/release)
target_link_libraries(aw_cmake_example astraweave_sdk)
target_include_directories(aw_cmake_example PRIVATE ${CMAKE_SOURCE_DIR}/..)
target_link_directories(aw_cmake_example PRIVATE ${CMAKE_SOURCE_DIR}/../target/release)
if(UNIX)
target_link_libraries(aw_cmake_example PRIVATE astraweave_sdk pthread dl m)
else()
target_link_libraries(aw_cmake_example PRIVATE astraweave_sdk)
endif()
EOF
cat > cmake_example/main.c << 'EOF'
#include <stdio.h>
Expand All @@ -119,9 +123,9 @@
cmake_minimum_required(VERSION 3.15)
project(aw_cmake_example C)
add_executable(aw_cmake_example main.c)
include_directories(${CMAKE_SOURCE_DIR}/..)
link_directories(${CMAKE_SOURCE_DIR}/..\target\release)
target_link_libraries(aw_cmake_example astraweave_sdk)
target_include_directories(aw_cmake_example PRIVATE ${CMAKE_SOURCE_DIR}/..)
target_link_directories(aw_cmake_example PRIVATE ${CMAKE_SOURCE_DIR}/../target/release)
target_link_libraries(aw_cmake_example PRIVATE astraweave_sdk)
'@
Set-Content -Path cmake_example/main.c -Value @'
#include <stdio.h>
Expand Down
Loading