Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
aliddell committed May 14, 2024
1 parent 65d44fa commit e6cc102
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 8 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build-s3.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion aws-sdk-cpp
Submodule aws-sdk-cpp deleted from 529117
9 changes: 3 additions & 6 deletions cmake/aws.cmake
Original file line number Diff line number Diff line change
@@ -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$<$<CONFIG:Debug>: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
Expand Down

0 comments on commit e6cc102

Please sign in to comment.