Skip to content

Commit

Permalink
Idk, let's see if this dependency installation trick works.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcourteaux committed Oct 26, 2023
1 parent fd28e53 commit 1ef25e3
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 22 deletions.
64 changes: 43 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,64 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04, ubuntu-18.04, windows-latest, macos-latest]
#os: [ubuntu-22.04, ubuntu-20.04, windows-latest, macos-latest]
os: [windows-latest]
include:
- os: ubuntu-22.04
outputsuffix: ubuntu-2204
archive_type: tar
archive_extension: tar.gz
- os: ubuntu-20.04
outputsuffix: ubuntu-2004
archive_type: tar
archive_extension: tar.gz
- os: ubuntu-18.04
outputsuffix: ubuntu-1804
archive_type: tar
archive_extension: tar.gz
- os: macos-latest
outputsuffix: mac
archive_type: tar
archive_extension: tar.gz
#- os: ubuntu-22.04
# outputsuffix: ubuntu-2204
# archive_type: tar
# archive_extension: tar.gz
#- os: ubuntu-20.04
# outputsuffix: ubuntu-2004
# archive_type: tar
# archive_extension: tar.gz
#- os: ubuntu-18.04
# outputsuffix: ubuntu-1804
# archive_type: tar
# archive_extension: tar.gz
#- os: macos-latest
# outputsuffix: mac
# archive_type: tar
# archive_extension: tar.gz
- os: windows-latest
outputsuffix: win
archive_type: zip
archive_extension: zip


steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install libjpeg-turbo (Windows)
if: runner.os == 'Windows'
run: |
vcpkg install libjpeg-turbo
- name: Configure CMake
if: runner.os == 'Windows'
# Configure CMake in a 'build' subdirectory.
run: cmake -S . -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --toolchain="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
if: runner.os != 'Windows'
# Configure CMake in a 'build' subdirectory.
run: cmake -S . -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel

- name: Cache vcpkg libraries
if: runner.os == 'Windows'
uses: actions/cache@v2
with:
path: |
vcpkg/installed
vcpkg/vcpkg
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}


- name: Archive Release
uses: thedoctor0/zip-release@0.7.0
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ target_include_directories(ctpl INTERFACE "lib/ctpl/")
set(JSON_MultipleHeaders ON CACHE BOOL "" FORCE)
add_subdirectory(lib/json)

find_package(JPEG REQUIRED)
find_package(JPEG)

set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
Expand All @@ -61,6 +61,7 @@ target_link_libraries(reproject PUBLIC
set_target_properties(reproject PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
target_compile_definitions(reproject PRIVATE -D_USE_MATH_DEFINES)



Expand Down

0 comments on commit 1ef25e3

Please sign in to comment.