Skip to content

Commit

Permalink
Use Jamba 7.1.3
Browse files Browse the repository at this point in the history
- added CI step
  • Loading branch information
ypujante committed Dec 2, 2024
1 parent 9635f81 commit 5d60c9e
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 13 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/run-tests-macos-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build (macOS)

on:
push:
branches:
- 'master'
tags-ignore:
- '*'

jobs:
run_tests:

runs-on: macos-14

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Project
working-directory: ${{github.workspace}}
run: ${{github.workspace}}/configure.py -- -DJAMBA_DOWNLOAD_VSTSDK=ON

- name: Run test/validate/archive (Release)
working-directory: ${{github.workspace}}/build
run: ./jamba.sh --release -b test validate archive

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: archive-macos
path: ${{github.workspace}}/build/*.zip
31 changes: 31 additions & 0 deletions .github/workflows/run-tests-windows-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build (Windows)

on:
push:
branches:
- 'master'
tags-ignore:
- '*'

jobs:
run_tests:
runs-on: windows-2022

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Project
working-directory: ${{github.workspace}}
run: python ${{github.workspace}}\configure.py -G "Visual Studio 17 2022" -- -DJAMBA_DOWNLOAD_VSTSDK=ON -A x64

- name: Run test/validate/archive (Release)
working-directory: ${{github.workspace}}/build
run: .\jamba.bat --release -b test validate archive

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: archive-windows
path: ${{github.workspace}}/build/*.zip
25 changes: 12 additions & 13 deletions fetch_jamba.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,40 @@ cmake_minimum_required(VERSION 3.19)
include(FetchContent)

set(JAMBA_GIT_REPO "https://github.com/pongasoft/jamba" CACHE STRING "Jamba git repository url")
set(JAMBA_GIT_TAG v7.1.2 CACHE STRING "Jamba git tag")
set(JAMBA_DOWNLOAD_URL "${JAMBA_GIT_REPO}/archive/refs/tags/v7.1.2.zip" CACHE STRING "Jamba download url")
set(JAMBA_DOWNLOAD_URL_HASH "SHA256=ad297edbfd6aaadea8a1762d58fff622c6e7275a3881c2d89e7b0e451ed757b2" CACHE STRING "Jamba download url hash")
set(JAMBA_GIT_TAG v7.1.3 CACHE STRING "Jamba git tag")
set(JAMBA_DOWNLOAD_URL "${JAMBA_GIT_REPO}/archive/refs/tags/v7.1.3.zip" CACHE STRING "Jamba download url")
set(JAMBA_DOWNLOAD_URL_HASH "SHA256=c177c031afebf97e3c8ccaf70e9de09a1cfbe4d4503e45106612cceef03f3fe0" CACHE STRING "Jamba download url hash")

if(JAMBA_ROOT_DIR)
message(STATUS "Using jamba from local ${JAMBA_ROOT_DIR}")
FetchContent_Populate(jamba
QUIET
SOURCE_DIR "${JAMBA_ROOT_DIR}"
BINARY_DIR "${CMAKE_BINARY_DIR}/jamba-build"
FetchContent_Declare(jamba
SOURCE_DIR "${JAMBA_ROOT_DIR}"
SOURCE_SUBDIR "do_not_make_available" # invalid folder to not execute jamba/CMakeLists.txt
)
else()
if(JAMBA_DOWNLOAD_URL STREQUAL "" OR JAMBA_DOWNLOAD_URL_HASH STREQUAL "")
message(STATUS "Fetching jamba from ${JAMBA_GIT_REPO}/tree/${JAMBA_GIT_TAG}")
FetchContent_Populate(jamba
QUIET
FetchContent_Declare(jamba
GIT_REPOSITORY ${JAMBA_GIT_REPO}
GIT_TAG ${JAMBA_GIT_TAG}
GIT_CONFIG advice.detachedHead=false
GIT_SHALLOW true
SOURCE_DIR "${CMAKE_BINARY_DIR}/jamba"
BINARY_DIR "${CMAKE_BINARY_DIR}/jamba-build"
SOURCE_SUBDIR "do_not_make_available"
)
else()
message(STATUS "Fetching jamba from ${JAMBA_DOWNLOAD_URL}")
FetchContent_Populate(jamba
QUIET
FetchContent_Declare(jamba
URL "${JAMBA_DOWNLOAD_URL}"
URL_HASH "${JAMBA_DOWNLOAD_URL_HASH}"
DOWNLOAD_EXTRACT_TIMESTAMP true
SOURCE_DIR "${CMAKE_BINARY_DIR}/jamba"
BINARY_DIR "${CMAKE_BINARY_DIR}/jamba-build"
SOURCE_SUBDIR "do_not_make_available"
)
endif()
endif()

FetchContent_MakeAvailable(jamba)

set(JAMBA_ROOT_DIR ${jamba_SOURCE_DIR})

0 comments on commit 5d60c9e

Please sign in to comment.