diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4b1e85a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,73 @@ +--- +name: CI + +on: + pull_request: + branches: + - master + types: + - opened + - synchronize + - reopened + push: + branches: + - master + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + # TODO: Win32 build cannot find OpenSSL + # - os: windows-latest + # cmake_args: -A Win32 + - os: windows-latest + cmake_args: -A x64 + - os: macos-latest + build_target: macos + cmake_args: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl + - os: ubuntu-latest + cc: clang + cxx: clang++ + - os: ubuntu-latest + cc: gcc + cxx: g++ + - os: ubuntu-latest + cc: clang + cxx: clang++ + cmake_args: -DUSE_MBEDTLS=ON + prebuild_cmd: sudo apt install -y libmbedtls-dev + - os: ubuntu-latest + cc: gcc + cxx: g++ + cmake_args: -DUSE_MBEDTLS=ON + prebuild_cmd: sudo apt install -y libmbedtls-dev + runs-on: ${{ matrix.os }} + name: Build + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Prebuild + if: matrix.prebuild_cmd + run: | + eval "${{ matrix.prebuild_cmd }}" + + - name: Build Debug + run: | + mkdir build_debug + cmake ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Debug -B build_debug -S . + cmake --build build_debug --config Debug + + - name: Build Release + run: | + mkdir build_release + cmake ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Release -B build_release -S . + cmake --build build_release --config Release diff --git a/.gitignore b/.gitignore index 8be66fa..bc8390e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ +.idea/ limelight-common/ARM/ limelight-common/Debug/ Build/ +cmake-*/ **/xcuserdata/ limelight-common/Release/ *.sdf diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d588963..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,48 +0,0 @@ -clone_depth: 1 - -environment: - matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - CMAKE_ARGS: -A Win32 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - CMAKE_ARGS: -A x64 - - APPVEYOR_BUILD_WORKER_IMAGE: macOS - BUILD_TARGET: macos - CMAKE_ARGS: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204 - CC: clang - CXX: clang++ - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204 - CC: gcc - CXX: g++ - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204 - CC: clang - CXX: clang++ - CMAKE_ARGS: -DUSE_MBEDTLS=ON - PREBUILD_CMD: sudo apt install -y libmbedtls-dev - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204 - CC: gcc - CXX: g++ - CMAKE_ARGS: -DUSE_MBEDTLS=ON - PREBUILD_CMD: sudo apt install -y libmbedtls-dev - -before_build: - - 'git submodule update --init --recursive' - - sh: 'eval "$PREBUILD_CMD"' - -build_script: - - 'mkdir build_debug' - - 'cd build_debug' - - sh: 'cmake $CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug ..' - - cmd: 'cmake %CMAKE_ARGS% -DCMAKE_BUILD_TYPE=Debug ..' - - sh: 'cmake --build .' - - cmd: 'cmake --build . --config Debug' - - 'cd ..' - - 'mkdir build_release' - - 'cd build_release' - - sh: 'cmake $CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release ..' - - cmd: 'cmake %CMAKE_ARGS% -DCMAKE_BUILD_TYPE=Release ..' - - sh: 'cmake --build .' - - cmd: 'cmake --build . --config Release' - -deploy: off