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

Simplify build #5

Merged
merged 4 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
78 changes: 19 additions & 59 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,18 @@ jobs:
fail-fast: false
matrix:
include:
- container: wpilib/roborio-cross-ubuntu:2025-22.04
artifact-name: Athena
build-options: -Pplatform=linuxathena -Psccache
- container: wpilib/raspbian-cross-ubuntu:bookworm-22.04
artifact-name: Arm32
build-options: -Pplatform=linuxarm32 -Psccache
- container: wpilib/aarch64-cross-ubuntu:bookworm-22.04
artifact-name: Arm64
build-options: -Pplatform=linuxarm64 -Psccache
- container: wpilib/ubuntu-base:22.04
artifact-name: Linux
build-options: -Pplatform=x64-linux
build-options: -Pplatform=linux-x86_64 -Psccache

name: "Build - ${{ matrix.artifact-name }}"
runs-on: ubuntu-latest
Expand All @@ -62,8 +71,8 @@ jobs:
sudo apt-get install -y ninja-build build-essential
- name: Install sccache
uses: mozilla-actions/[email protected]
- run: ./gradlew publish ${{ matrix.build-options }}
name: Build with Gradle
- name: Build with Gradle
run: ./gradlew publish ${{ matrix.build-options }}
env:
SCCACHE_GHA_ENABLED: "true"
- uses: actions/upload-artifact@v4
Expand All @@ -78,10 +87,10 @@ jobs:
include:
- artifact-name: WinArm64
tool-arch: amd64_arm64
build-options: -Pplatform=arm64-windows
build-options: -Pplatform=windows-arm64 -Psccache
- artifact-name: Win64
tool-arch: amd64
build-options: -Pplatform=x64-windows
build-options: -Pplatform=windows-x86_64 -Psccache

name: "Build - ${{ matrix.artifact-name }}"
runs-on: windows-2019
Expand All @@ -98,8 +107,8 @@ jobs:
arch: ${{ matrix.tool-arch }}
- name: Install sccache
uses: mozilla-actions/[email protected]
- run: ./gradlew publish ${{ matrix.build-options }}
name: Build with Gradle
- name: Build with Gradle
run: ./gradlew publish ${{ matrix.build-options }}
env:
SCCACHE_GHA_ENABLED: "true"
- uses: actions/upload-artifact@v4
Expand All @@ -122,67 +131,18 @@ jobs:
name: install ninja
- name: Install sccache
uses: mozilla-actions/[email protected]
- run: ./gradlew publish -Pplatform=x64-osx
name: Build with Gradle
- name: Build with Gradle
run: ./gradlew publish -Pplatform=osx-universal -Psccache
env:
SCCACHE_GHA_ENABLED: "true"
- uses: actions/upload-artifact@v4
with:
name: macOS
path: gradleDir/outputs/

build-mac-arm:
name: "Build - macOS (Arm)"
runs-on: macOS-14
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- run: brew install cmake ninja
name: install ninja
- name: Install sccache
uses: mozilla-actions/[email protected]
- run: ./gradlew publish -Pplatform=arm64-osx
name: Build with Gradle
env:
SCCACHE_GHA_ENABLED: "true"
- uses: actions/upload-artifact@v4
with:
name: macOSArm
path: gradleDir/outputs/

make_universal:
name: Make Universal
needs: [build-mac, build-mac-arm]
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: macOS
path: build/downloads
- uses: actions/download-artifact@v4
with:
name: macOSArm
path: build/downloads
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- run: ./gradlew copyToUpload -Prunmerge
name: Build with Gradle
- uses: actions/upload-artifact@v4
with:
name: macOSUniversal
path: build/toUpload/

combine:
name: Combine
needs: [build-docker, build-windows, make_universal] # , build-roborio]
needs: [build-docker, build-windows, build-mac] # , build-roborio]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/vcpkg_installed
/build
/buildDebug
/build*
/install*
/.gradle
/gradleDir
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "" FORCE)
endif()

cmake_minimum_required(VERSION 3.16)

cmake_minimum_required(VERSION 3.25)
set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)
project(thirdparty-gtsam)

set(GTSAM_COMPILE_OPTIONS_PRIVATE_DEBUG CACHE INTERNAL FORCE)
set(GTSAM_COMPILE_OPTIONS_PRIVATE_RELWITHDEBINFO CACHE INTERNAL FORCE)
set(GTSAM_ENABLE_BOOST_SERIALIZATION OFF)
set(GTSAM_USE_BOOST_FEATURES OFF)
set(GTSAM_BUILD_PYTHON OFF)
Expand All @@ -21,5 +24,4 @@ fetchcontent_declare(
GIT_REPOSITORY https://github.com/borglab/gtsam
GIT_TAG 6f7365e1f393d219dad5e65752529c7c0369fefc
)
fetchcontent_makeavailable(gtsam)
add_library(gtsam_static STATIC IMPORTED)
fetchcontent_makeavailable(gtsam)
6 changes: 1 addition & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
if (project.hasProperty('runmerge')) {
apply from: 'merge.gradle'
} else {
apply from: 'publish.gradle'
}
apply from: 'publish.gradle'
3 changes: 0 additions & 3 deletions copy-headers.sh

This file was deleted.

166 changes: 0 additions & 166 deletions merge.gradle

This file was deleted.

Loading
Loading