Merge dev and edge-server branches; remove tool_support #299
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build And Test | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
- 'release/*' | |
pull_request: | |
branches: | |
- '**' | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
#### BUILD CBLITE | |
build-cblite: | |
# Build on Ubuntu Linux + GCC, macOS + Apple Clang, Windows + MSVC. | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Create Build Environment | |
# Create a build directory, as our working directory for all subsequent commands | |
working-directory: ${{github.workspace}}/cblite | |
run: cmake -E make_directory ${{github.workspace}}/cblite/build | |
- name: Configure CMake | |
# "Note the current convention is to use the -S and -B options here to specify source | |
# and build directories, but this is only available with CMake 3.13 and higher. | |
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12" | |
if: runner.os != 'Windows' | |
working-directory: ${{github.workspace}}/cblite/build | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
export CC=gcc-12 CXX=g++-12 # GCC 11 has problems building LiteCore's DateFormat.cc | |
fi | |
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE | |
- name: Configure CMake (Windows) | |
# "Note the current convention is to use the -S and -B options here to specify source | |
# and build directories, but this is only available with CMake 3.13 and higher. | |
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12" | |
if: runner.os == 'Windows' | |
working-directory: ${{github.workspace}}/cblite/build | |
run: cmake .. -A x64 | |
- name: Build | |
# Use cmake to build -- this will invoke `make` on Linux/Mac, Visual Studio on Windows. | |
working-directory: ${{github.workspace}}/cblite/build | |
run: cmake --build . --config $env:BUILD_TYPE | |
- name: Save cblite binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cblite-${{ matrix.os }}-${{ matrix.version }} | |
path: ${{github.workspace}}/cblite/build/cblite* | |
retention-days: 7 | |
#### BUILD CBL-LOG | |
build-cbllog: | |
# Same as cblite, but for cbl-log | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Create Build Environment | |
working-directory: ${{github.workspace}}/cbl-log | |
run: cmake -E make_directory ${{github.workspace}}/cbl-log/build | |
- name: Configure CMake | |
if: runner.os != 'Windows' | |
working-directory: ${{github.workspace}}/cbl-log/build | |
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE | |
- name: Configure CMake (Windows) | |
if: runner.os == 'Windows' | |
working-directory: ${{github.workspace}}/cbl-log/build | |
run: cmake .. -A x64 | |
- name: Build | |
working-directory: ${{github.workspace}}/cbl-log/build | |
run: cmake --build . --config $env:BUILD_TYPE --target cbl-log | |
- name: Save cbl-log binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cbl-log-${{ matrix.os }}-${{ matrix.version }} | |
path: ${{github.workspace}}/cbl-log/build/cbl-log* | |
retention-days: 7 |