Skip to content

CMakeLists.txt修改,现在自动复制库文件 #35

CMakeLists.txt修改,现在自动复制库文件

CMakeLists.txt修改,现在自动复制库文件 #35

Workflow file for this run

name: Build
on:
push:
branches:
- main
#可以手动触发
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
build-type: [Debug, Release]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- uses: ilammy/msvc-dev-cmd@v1
- name: Setup Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.7.2'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
cache: true
- uses: lukka/get-cmake@latest
- name: Setup aws-sdk-cpp
run: |
git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp
cd aws-sdk-cpp
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="C:/Program Files (x86)/aws" -DBUILD_ONLY="s3"
cmake --build . --config=Release
cmake --install . --config=Release
cd ../..
#display the content of the directory
ls
- name: Run CMake
run: |
#set DCMAKE_PREFIX_PATH to environment variable %QTDIR%
cmake -B build -S . -G "Visual Studio 17 2022" -DCMAKE_PREFIX_PATH=$env:QTDIR -DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
cmake --build build --config ${{ matrix.build-type }} --parallel 18
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
path: build/${{ matrix.build-type }}
name: ${{ matrix.build-type }}