CBL-5661 : Fix a released captured context may be used in observer callback #1246
Workflow file for this run
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.) | |
# NOTE: If we decide to archive the build products we should build with RelWithDebInfo instead. | |
BUILD_TYPE: Debug | |
jobs: | |
build: | |
# Build/test 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 | |
#### BUILD | |
- name: Create Build Environment | |
# Create a build directory, as our working directory for all subsequent commands | |
working-directory: ${{github.workspace}} | |
run: cmake -E make_directory ${{github.workspace}}/build | |
# - name: Generate Export Lists | |
# working-directory: ${{github.workspace}}/src/exports | |
# shell: bash | |
# run: generate_exports.sh | |
- 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}}/build | |
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/out | |
- 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}}/build | |
run: cmake .. -A x64 -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/out | |
- name: Build | |
# Use cmake to build -- this will invoke `make` on Linux/Mac, Visual Studio on Windows. | |
working-directory: ${{github.workspace}}/build | |
run: cmake --build . --config ${{env.BUILD_TYPE}} | |
#### TEST | |
# CBL_C_Tests is in a subdir, but expects the current directory to be the project root. | |
- name: Test | |
if: runner.os != 'Windows' | |
working-directory: ${{github.workspace}} | |
shell: bash | |
run: | | |
pushd build/test | |
./CBL_C_Tests -r list | |
popd | |
- name: Test On Windows | |
if: runner.os == 'Windows' | |
working-directory: ${{github.workspace}} | |
shell: bash | |
# Windows CMake puts the binary in a subdirectory named after the build type... | |
run: | | |
mkdir -p /c/tmp | |
pushd build/test/$BUILD_TYPE | |
./CBL_C_Tests.exe -r list | |
popd |