From e6cc102312ace3e7b259e6167c13f9d6140e710d Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 14 May 2024 16:37:45 -0400 Subject: [PATCH] wip --- .github/workflows/build-s3.yml | 59 ++++++++++++++++++++++++++++++++++ CMakeLists.txt | 2 +- aws-sdk-cpp | 1 - cmake/aws.cmake | 9 ++---- 4 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build-s3.yml delete mode 160000 aws-sdk-cpp diff --git a/.github/workflows/build-s3.yml b/.github/workflows/build-s3.yml new file mode 100644 index 00000000..60fea476 --- /dev/null +++ b/.github/workflows/build-s3.yml @@ -0,0 +1,59 @@ +name: Build AWS SDK C++ for Windows, Linux, and MacOS + +on: + pull_request: # TODO (aliddell): replace with workflow_dispatch + branches: + - main + +jobs: + build: + name: Build aws-sdk-cpp ${{ matrix.build_type }} on ${{ matrix.platform }} + runs-on: ${{ matrix.platform }} + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + platform: + - windows-latest + - ubuntu-latest + - macos-latest + build_type: + - Debug + - Release + - RelWithDebInfo + permissions: + actions: write + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.10.0 + with: + access_token: ${{ github.token }} + + - name: Install Dependencies + if: matrix.platform == 'ubuntu-latest' + run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev + + - name: Clone + run: git clone --recursive https://github.com/aws/aws-sdk-cpp.git --branch 1.11.328 + working-directory: ${{github.workspace}}/.. + + - name: Checkout submodules + run: git submodule update --init --recursive + working-directory: ${{github.workspace}}/../aws-sdk-cpp + + - name: Configure + run: cmake -B ${{github.workspace}}/../build . -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DBUILD_ONLY="s3" -DENABLE_TESTING=OFF + working-directory: ${{github.workspace}}/../aws-sdk-cpp + + - name: Build + run: cmake --build ${{github.workspace}}/../build --config ${{matrix.build_type}} + + - name: Install + run: cmake --install ${{github.workspace}}/../build --config ${{matrix.build_type}} + + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: aws-sdk-cpp-${{matrix.build_type}}-${{matrix.platform}} + path: ${{github.workspace}}/install \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index c7fa38b6..32d9ad3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ include(cmake/ide.cmake) include(cmake/install-prefix.cmake) include(cmake/wsl.cmake) include(cmake/simd.cmake) -include(cmake/aws.cmake) +#include(cmake/aws.cmake) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 20) diff --git a/aws-sdk-cpp b/aws-sdk-cpp deleted file mode 160000 index 5291172b..00000000 --- a/aws-sdk-cpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5291172b51acaa6e7b228e0c15798ab224242b14 diff --git a/cmake/aws.cmake b/cmake/aws.cmake index d1a3a75b..3f96532f 100644 --- a/cmake/aws.cmake +++ b/cmake/aws.cmake @@ -1,13 +1,10 @@ set(SERVICE_COMPONENTS s3) set(AWS_SDK_DIR "${CMAKE_CURRENT_LIST_DIR}/../aws-sdk-cpp") file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-build) -set(MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") -execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" "${AWS_SDK_DIR}" - -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-install - -DBUILD_ONLY=${SERVICE_COMPONENTS} - -DENABLE_TESTING=OFF - -DMSVC_RUNTIME_LIBRARY=${MSVC_RUNTIME_LIBRARY} +set(ARGS "-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-install -DBUILD_ONLY=${SERVICE_COMPONENTS} -DENABLE_TESTING=OFF") + +execute_process(COMMAND "${CMAKE_COMMAND}" ${ARGS} ${AWS_SDK_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-build ) execute_process(COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-build --config ${CMAKE_BUILD_TYPE} --target install