Skip to content

Commit

Permalink
GitHub Actions CI enhancements (#1063)
Browse files Browse the repository at this point in the history
* try fixing running cmake twice

* try a different cpath

* update cc, cxx, ldflags, cpath

* remove CC and CXX

* try /usr/bin/clang and /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld

* -L/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib/

* specify host for log4cplus

* don't install logcplus with brew

* try using clang 14

* add missing space

* don't set cc and cxx

* configure CMAKE_OSX_SYSROOT before creating the configure command

* try ldflags and paths with cmake fix

* remove prefix from configure_command

* update ldflags

* fix install

* rearrange

* put back configure

* put back host in cmake instruction

* PREFIX            /build

* try using source_dir

* remove source_dir

* move back prefix

* put back flags

* only remove prefix from configure_command

* missing space

* if (APPLE)

* install

* check compiler

* use '' STREQUAL

* check clang compiler

* osxsysroot

* Add back osx_sysroot

* remove space from libcurl

* project(log4cplus-download NONE) to fix gcc

* try LANGUAGES CPP) in all cmake files

* try C)

* try CXX

* fix ubuntu build
  • Loading branch information
niyatim23 authored Oct 24, 2023
1 parent 6a41789 commit 486cb35
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 12 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
runs-on: macos-11
env:
AWS_KVS_LOG_LEVEL: 2
CC: /usr/bin/clang
CXX: /usr/bin/clang++
LDFLAGS: -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
CPATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/
permissions:
id-token: write
contents: read
Expand All @@ -22,12 +26,12 @@ jobs:
uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install pkg-config openssl cmake gstreamer log4cplus
brew install pkg-config openssl cmake gstreamer
brew unlink openssl
- name: Build repository
run: |
mkdir build && cd build
sh -c 'cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE;cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE -DCMAKE_INSTALL_PREFIX=.'
cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE -DCMAKE_INSTALL_PREFIX=.
make
make install
- name: Configure AWS Credentials
Expand Down Expand Up @@ -243,8 +247,6 @@ jobs:
runs-on: ubuntu-20.04
env:
AWS_KVS_LOG_LEVEL: 2
CC: gcc
CXX: g++
permissions:
id-token: write
contents: read
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ open-source/libusrsctp
open-source/libwebsockets
open-source/local
open-source/libautoconf
open-source/liblog4cplus
outputs
tags
dependency
Expand Down
2 changes: 1 addition & 1 deletion CMake/Dependencies/libautoconf-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.6.3)

project(libautoconf-download NONE)
project(libautoconf-download LANGUAGES CXX)

find_program(MAKE_EXE NAMES make)

Expand Down
2 changes: 1 addition & 1 deletion CMake/Dependencies/libautomake-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.6.3)

project(libautomake-download NONE)
project(libautomake-download LANGUAGES CXX)

find_program(MAKE_EXE NAMES make)

Expand Down
2 changes: 1 addition & 1 deletion CMake/Dependencies/libcurl-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.6.3)

project(libcurl-download NONE)
project(libcurl-download LANGUAGES CXX)

find_program(MAKE_EXE NAMES make)

Expand Down
2 changes: 1 addition & 1 deletion CMake/Dependencies/libgtest-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.6.3)

project(libgtest-download NONE)
project(libgtest-download LANGUAGES CXX)

include(ExternalProject)

Expand Down
2 changes: 1 addition & 1 deletion CMake/Dependencies/libjsmn-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.6.3)

project(libjsmn-download NONE)
project(libjsmn-download LANGUAGES CXX)

include(ExternalProject)
ExternalProject_Add(project_libjsmn
Expand Down
2 changes: 1 addition & 1 deletion CMake/Dependencies/libkvscproducer-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.6.3)

project(libkvscproducer-download NONE)
project(libkvscproducer-download LANGUAGES CXX)

include(ExternalProject)

Expand Down
5 changes: 4 additions & 1 deletion CMake/Dependencies/liblog4cplus-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.6.3)
find_program(MAKE_EXE NAMES make)

project(log4cplus-download NONE)
project(log4cplus-download LANGUAGES CXX)

set(BUILD_SHARED_LIBS 1)
if (BUILD_STATIC)
Expand All @@ -19,6 +19,9 @@ if (DEFINED CMAKE_OSX_SYSROOT AND NOT CMAKE_OSX_SYSROOT STREQUAL "")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isysroot${CMAKE_OSX_SYSROOT}")
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
SET(CONFIGURE_COMMAND ${CONFIGURE_STATIC})
endif()

include(ExternalProject)

Expand Down
2 changes: 1 addition & 1 deletion CMake/Dependencies/libopenssl-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.6.3)

project(libopenssl-download NONE)
project(libopenssl-download LANGUAGES CXX)

if (WIN32)
find_program(MAKE_EXE NAMES nmake)
Expand Down

0 comments on commit 486cb35

Please sign in to comment.