Skip to content

Commit

Permalink
Merge a7e430f into 4713181
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-hui authored Dec 11, 2023
2 parents 4713181 + a7e430f commit 75ef6bf
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
50 changes: 47 additions & 3 deletions .github/workflows/firestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jobs:
- name: Run check
run: scripts/check.sh --test-only


cmake:
needs: check
# Either a scheduled run from public repo, or a pull request with firestore changes.
Expand Down Expand Up @@ -231,7 +230,7 @@ jobs:
scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
sanitizers:
sanitizers-mac:
# Either a scheduled run from public repo, or a pull request with firestore changes.
if: |
(github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
Expand All @@ -240,7 +239,6 @@ jobs:

strategy:
matrix:
# TODO(b/260248007): Re-enable this once tsan passes on Linux
os: [macos-12]
sanitizer: [asan, tsan]

Expand Down Expand Up @@ -274,6 +272,52 @@ jobs:
scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
sanitizers-ubuntu:
# Either a scheduled run from public repo, or a pull request with firestore changes.
if: |
(github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') ||
(github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true')
needs: check

strategy:
matrix:
os: [ubuntu-latest]
# Excluding TSAN on ubuntu because of the warnings it generates around schedule.cc.
# This could be due to Apple Clang provide additional support for synchronization
# on Apple platforms, which is what we primarily care about.
sanitizer: [asan]

runs-on: ${{ matrix.os }}

env:
SANITIZERS: ${{ matrix.sanitizer }}
ASAN_OPTIONS: detect_leaks=0

steps:
- uses: actions/checkout@v3

- name: Prepare ccache
uses: actions/cache@v3
with:
path: ${{ runner.temp }}/ccache
key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }}
restore-keys: |
${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-
- uses: actions/setup-python@v4
with:
python-version: '3.7'

- name: Setup build
run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake

- name: Build and test
run: |
export EXPERIMENTAL_MODE=true
export CCACHE_DIR=${{ runner.temp }}/ccache
scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
xcodebuild:
# Either a scheduled run from public repo, or a pull request with firestore changes.
if: |
Expand Down
3 changes: 1 addition & 2 deletions Firestore/core/src/util/schedule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "Firestore/core/src/util/hard_assert.h"
#include "Firestore/core/src/util/task.h"
#include "absl/memory/memory.h"

namespace firebase {
namespace firestore {
Expand All @@ -29,7 +28,7 @@ Schedule::~Schedule() {
}

void Schedule::Clear() {
std::unique_lock<std::mutex> lock{mutex_};
std::lock_guard<std::mutex> lock{mutex_};

for (Task* task : scheduled_) {
task->Release();
Expand Down

0 comments on commit 75ef6bf

Please sign in to comment.