diff --git a/.github/workflows/build-cachelib-centos-9.yml b/.github/workflows/build-cachelib-centos-9.yml deleted file mode 100644 index a47166f483..0000000000 --- a/.github/workflows/build-cachelib-centos-9.yml +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: build-cachelib-centos-9 -on: - push: - tags: - - 'v*' - pull_request: - workflow_dispatch: - schedule: - - cron: '0 10 * * *' -jobs: - build-cachelib-centos8-latest: - name: "CentOS/9 - Build CacheLib with all dependencies" - runs-on: ubuntu-latest - # Docker container image name - container: "quay.io/centos/centos:stream9" - steps: - - name: "Show Head Commit" - env: - CONTENT: ${{ toJSON(github.event.head_commit) }} - run: echo "$CONTENT" - - name: "update packages" - # stock centos has a problem with CMAKE, fails with: - # "cmake: symbol lookup error: cmake: undefined symbol: archive_write_add_filter_zstd" - # updating solves it - run: dnf update -y - - name: "install sudo,git" - run: dnf install -y sudo git cmake gcc procps - - name: "System Information" - run: | - echo === uname === - uname -a - echo === /etc/os-release === - cat /etc/os-release - echo === /etc/centos-release === - cat /etc/centos-release - echo === df -hl === - df -hl - echo === nproc === - nproc || true - echo === free -h === - free -h - echo === top === - top -b -n1 -1 -Eg || timeout 1 top -b -n1 - echo === env === - env - echo === gcc -v === - gcc -v - - name: "checkout sources" - uses: actions/checkout@v3 - - name: "Add workspace as a safe directory" - run: git config --system --add safe.directory $GITHUB_WORKSPACE - - name: "Install Prerequisites" - run: ./contrib/build.sh -S -B - - name: "Test: update-submodules" - run: ./contrib/update-submodules.sh - - name: "Install dependency: zstd" - run: ./contrib/build-package.sh -j -v -i zstd - - name: "Install dependency: googleflags" - run: ./contrib/build-package.sh -j -v -i googleflags - - name: "Install dependency: googlelog" - run: ./contrib/build-package.sh -j -v -i googlelog - - name: "Install dependency: googletest" - run: ./contrib/build-package.sh -j -v -i googletest - - name: "Install dependency: sparsemap" - run: ./contrib/build-package.sh -j -v -i sparsemap - - name: "Install dependency: fmt" - run: ./contrib/build-package.sh -j -v -i fmt - - name: "Install dependency: folly" - run: ./contrib/build-package.sh -j -v -i folly - - name: "Install dependency: fizz" - run: ./contrib/build-package.sh -j -v -i fizz - - name: "Install dependency: wangle" - run: ./contrib/build-package.sh -j -v -i wangle - - name: "Install dependency: mvfst" - run: ./contrib/build-package.sh -j -v -i mvfst - - name: "Install dependency: fbthrift" - run: ./contrib/build-package.sh -j -v -i fbthrift - - name: "build CacheLib" - # Build cachelib in debug mode (-d) - run: ./contrib/build-package.sh -j -v -i -d cachelib - - name: "run cachebench" - run: ./opt/cachelib/bin/cachebench --json_test_config ./opt/cachelib/test_configs/simple_test.json - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: cachelib-cmake-logs - path: | - build-cachelib/CMakeFiles/*.log - build-cachelib/CMakeCache.txt - build-cachelib/Makefile - build-cachelib/**/Makefile - if-no-files-found: warn - retention-days: 1 diff --git a/.github/workflows/build-cachelib-rockylinux-9.yml b/.github/workflows/build-cachelib-rockylinux-9.yml deleted file mode 100644 index 1741c0240c..0000000000 --- a/.github/workflows/build-cachelib-rockylinux-9.yml +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: build-cachelib-rockylinux-9.0 -on: - push: - tags: - - 'v*' - pull_request: - workflow_dispatch: - schedule: - - cron: '0 17 * * *' -jobs: - build-cachelib-rockylinux-9: - name: "RockyLinux-9.0 - Build CacheLib with all dependencies" - runs-on: ubuntu-latest - # Docker container image name - container: "rockylinux:9.0" - steps: - - name: "Show Head Commit" - env: - CONTENT: ${{ toJSON(github.event.head_commit) }} - run: echo "$CONTENT" - - name: "update packages" - # stock centos has a problem with CMAKE, fails with: - # "cmake: symbol lookup error: cmake: undefined symbol: archive_write_add_filter_zstd" - # updating solves it - run: dnf update -y - - name: "install sudo,git" - run: dnf install -y sudo git cmake gcc procps - - name: "System Information" - run: | - echo === uname === - uname -a - echo === /etc/os-release === - cat /etc/os-release - echo === df -hl === - df -hl - echo === nproc === - nproc || true - echo === free -h === - free -h - echo === top === - top -b -n1 -1 -Eg || timeout 1 top -b -n1 - echo === env === - env - echo === gcc -v === - gcc -v - - name: "checkout sources" - uses: actions/checkout@v3 - - name: "Add workspace as a safe directory" - run: git config --system --add safe.directory $GITHUB_WORKSPACE - - name: "Install Prerequisites" - run: ./contrib/build.sh -S -B - - name: "Test: update-submodules" - run: ./contrib/update-submodules.sh - - name: "Install dependency: zstd" - run: ./contrib/build-package.sh -j -v -i zstd - - name: "Install dependency: googleflags" - run: ./contrib/build-package.sh -j -v -i googleflags - - name: "Install dependency: googlelog" - run: ./contrib/build-package.sh -j -v -i googlelog - - name: "Install dependency: googletest" - run: ./contrib/build-package.sh -j -v -i googletest - - name: "Install dependency: sparsemap" - run: ./contrib/build-package.sh -j -v -i sparsemap - - name: "Install dependency: fmt" - run: ./contrib/build-package.sh -j -v -i fmt - - name: "Install dependency: folly" - run: | - # see: https://aur.archlinux.org/packages/folly#comment-862543 - sed -i '$aset(LIBDWARF_INCLUDE_DIRS "/usr/include/libdwarf-0")' cachelib/external/folly/CMake/FindLibDwarf.cmake - ./contrib/build-package.sh -S -j -v -i folly - - name: "Install dependency: fizz" - run: ./contrib/build-package.sh -j -v -i fizz - - name: "Install dependency: wangle" - run: ./contrib/build-package.sh -j -v -i wangle - - name: "Install dependency: mvfst" - run: ./contrib/build-package.sh -j -v -i mvfst - - name: "Install dependency: fbthrift" - run: ./contrib/build-package.sh -j -v -i fbthrift - - name: "build CacheLib" - # Build cachelib in debug mode (-d) - run: ./contrib/build-package.sh -j -v -i -d cachelib - - name: "run cachebench" - run: ./opt/cachelib/bin/cachebench --json_test_config ./opt/cachelib/test_configs/simple_test.json - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: cachelib-cmake-logs - path: | - build-cachelib/CMakeFiles/*.log - build-cachelib/CMakeCache.txt - build-cachelib/Makefile - build-cachelib/**/Makefile - if-no-files-found: warn - retention-days: 1 diff --git a/.github/workflows/build-cachelib-ubuntu-22.yml b/.github/workflows/build-cachelib-ubuntu-22.yml deleted file mode 100644 index e39359c69c..0000000000 --- a/.github/workflows/build-cachelib-ubuntu-22.yml +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: build-cachelib-ubuntu-22 -on: - push: - tags: - - 'v*' - pull_request: - workflow_dispatch: - schedule: - - cron: '0 7 * * *' -jobs: - build-cachelib-ubuntu-22: - name: "Ubuntu-22 - Build CacheLib with all dependencies" - runs-on: ubuntu-22.04 - steps: - - name: "Show Head Commit" - env: - CONTENT: ${{ toJSON(github.event.head_commit) }} - run: echo "$CONTENT" - - name: "update packages" - run: sudo apt-get update - - name: "install sudo,git" - run: sudo apt-get install -y git procps - - name: "System Information" - run: | - echo === uname === - uname -a - echo === /etc/os-release === - cat /etc/os-release - echo === df -hl === - df -hl - echo === nproc === - nproc || true - echo === free -h === - free -h - echo === top === - top -b -n1 -1 -Eg || timeout 1 top -b -n1 - echo === env === - env - echo === cc -v === - cc -v - echo === g++ -v === - g++ -v - - name: "checkout sources" - uses: actions/checkout@v3 - - name: "Add workspace as a safe directory" - run: git config --global --add safe.directory $GITHUB_WORKSPACE - - name: "Install Prerequisites" - run: ./contrib/build.sh -S -B - - name: "Test: update-submodules" - run: ./contrib/update-submodules.sh - - name: "Install dependency: zstd" - run: ./contrib/build-package.sh -j -v -i zstd - - name: "Install dependency: googleflags" - run: ./contrib/build-package.sh -j -v -i googleflags - - name: "Install dependency: googlelog" - run: ./contrib/build-package.sh -j -v -i googlelog - - name: "Install dependency: googletest" - run: ./contrib/build-package.sh -j -v -i googletest - - name: "Install dependency: sparsemap" - run: ./contrib/build-package.sh -j -v -i sparsemap - - name: "Install dependency: fmt" - run: ./contrib/build-package.sh -j -v -i fmt - - name: "Install dependency: folly" - run: ./contrib/build-package.sh -j -v -i folly - - name: "Install dependency: fizz" - run: ./contrib/build-package.sh -j -v -i fizz - - name: "Install dependency: wangle" - run: ./contrib/build-package.sh -j -v -i wangle - - name: "Install dependency: mvfst" - run: ./contrib/build-package.sh -j -v -i mvfst - - name: "Install dependency: fbthrift" - run: ./contrib/build-package.sh -j -v -i fbthrift - - name: "build CacheLib" - # Build cachelib in debug mode (-d) and with all tests (-t) - run: ./contrib/build-package.sh -j -v -i -d -t cachelib - - name: "run cachebench" - run: ./opt/cachelib/bin/cachebench --json_test_config ./opt/cachelib/test_configs/simple_test.json - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: cachelib-cmake-logs - path: | - build-cachelib/CMakeFiles/*.log - build-cachelib/CMakeCache.txt - build-cachelib/Makefile - build-cachelib/**/Makefile - if-no-files-found: warn - retention-days: 1 diff --git a/.github/workflows/getdeps_linux.yml b/.github/workflows/getdeps_linux.yml new file mode 100644 index 0000000000..8c7c9e2a00 --- /dev/null +++ b/.github/workflows/getdeps_linux.yml @@ -0,0 +1,188 @@ +# This file was @generated by getdeps.py + +name: linux + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: "update packages" + run: sudo apt-get update + - name: "install sudo,git" + run: sudo apt-get install -y libaio-dev + - uses: actions/checkout@v4 + - name: Update system package info + run: sudo apt-get update + - name: Install system deps + run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive cachelib + - name: Install packaging system deps + run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive patchelf + - name: Fetch libaio + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libaio + - name: Fetch ninja + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ninja + - name: Fetch cmake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests cmake + - name: Fetch fmt + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fmt + - name: Fetch googletest + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests googletest + - name: Fetch xxhash + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests xxhash + - name: Fetch zstd + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests zstd + - name: Fetch zlib + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests zlib + - name: Fetch boost + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests boost + - name: Fetch double-conversion + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests double-conversion + - name: Fetch fast_float + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fast_float + - name: Fetch gflags + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests gflags + - name: Fetch glog + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests glog + - name: Fetch libdwarf + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libdwarf + - name: Fetch libevent + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libevent + - name: Fetch lz4 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests lz4 + - name: Fetch snappy + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests snappy + - name: Fetch sparsemap + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests sparsemap + - name: Fetch bz2 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests bz2 + - name: Fetch openssl + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests openssl + - name: Fetch liboqs + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests liboqs + - name: Fetch autoconf + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests autoconf + - name: Fetch automake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests automake + - name: Fetch libtool + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libtool + - name: Fetch numa + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests numa + - name: Fetch libiberty + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libiberty + - name: Fetch libsodium + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libsodium + - name: Fetch libunwind + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libunwind + - name: Fetch xz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests xz + - name: Fetch folly + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests folly + - name: Fetch fizz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fizz + - name: Fetch wangle + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests wangle + - name: Fetch mvfst + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests mvfst + - name: Fetch libffi + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libffi + - name: Fetch ncurses + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ncurses + - name: Fetch python + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests python + - name: Fetch fbthrift + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fbthrift + - name: Build libaio + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libaio + - name: Build ninja + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests ninja + - name: Build cmake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests cmake + - name: Build fmt + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fmt + - name: Build googletest + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests googletest + - name: Build xxhash + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests xxhash + - name: Build zstd + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests zstd + - name: Build zlib + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests zlib + - name: Build boost + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests boost + - name: Build double-conversion + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests double-conversion + - name: Build fast_float + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fast_float + - name: Build gflags + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests gflags + - name: Build glog + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests glog + - name: Build libdwarf + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libdwarf + - name: Build libevent + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libevent + - name: Build lz4 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests lz4 + - name: Build snappy + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests snappy + - name: Build sparsemap + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests sparsemap + - name: Build bz2 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests bz2 + - name: Build openssl + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests openssl + - name: Build liboqs + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests liboqs + - name: Build autoconf + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests autoconf + - name: Build automake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests automake + - name: Build libtool + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libtool + - name: Build numa + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests numa + - name: Build libiberty + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libiberty + - name: Build libsodium + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libsodium + - name: Build libunwind + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libunwind + - name: Build xz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests xz + - name: Build folly + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests folly + - name: Build fizz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fizz + - name: Build wangle + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests wangle + - name: Build mvfst + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests mvfst + - name: Build libffi + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libffi + - name: Build ncurses + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests ncurses + - name: Build python + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests python + - name: Build fbthrift + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fbthrift + - name: Build cachelib + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. cachelib --project-install-prefix cachelib:/usr/local + - name: Copy artifacts + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fixup-dyn-deps --strip --src-dir=. cachelib _artifacts/linux --project-install-prefix cachelib:/usr/local --final-install-prefix /usr/local + - uses: actions/upload-artifact@v4 + with: + name: cachelib + path: _artifacts + - name: Test cachelib + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. cachelib --project-install-prefix cachelib:/usr/local diff --git a/.github/workflows/getdeps_mac.yml b/.github/workflows/getdeps_mac.yml new file mode 100644 index 0000000000..da31409c7d --- /dev/null +++ b/.github/workflows/getdeps_mac.yml @@ -0,0 +1,150 @@ +# This file was @generated by getdeps.py + +name: mac + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + build: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v4 + - name: Fetch ninja + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests ninja + - name: Fetch cmake + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests cmake + - name: Fetch fmt + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests fmt + - name: Fetch googletest + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests googletest + - name: Fetch xxhash + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests xxhash + - name: Fetch zstd + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests zstd + - name: Fetch zlib + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests zlib + - name: Fetch boost + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests boost + - name: Fetch double-conversion + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests double-conversion + - name: Fetch fast_float + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests fast_float + - name: Fetch gflags + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests gflags + - name: Fetch glog + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests glog + - name: Fetch libdwarf + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libdwarf + - name: Fetch lz4 + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests lz4 + - name: Fetch openssl + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests openssl + - name: Fetch snappy + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests snappy + - name: Fetch sparsemap + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests sparsemap + - name: Fetch liboqs + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests liboqs + - name: Fetch libevent + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libevent + - name: Fetch autoconf + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests autoconf + - name: Fetch automake + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests automake + - name: Fetch libtool + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libtool + - name: Fetch numa + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests numa + - name: Fetch libsodium + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libsodium + - name: Fetch xz + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests xz + - name: Fetch folly + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests folly + - name: Fetch fizz + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests fizz + - name: Fetch wangle + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests wangle + - name: Fetch mvfst + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests mvfst + - name: Fetch fbthrift + run: python3 build/fbcode_builder/getdeps.py fetch --no-tests fbthrift + - name: Build ninja + run: python3 build/fbcode_builder/getdeps.py build --no-tests ninja + - name: Build cmake + run: python3 build/fbcode_builder/getdeps.py build --no-tests cmake + - name: Build fmt + run: python3 build/fbcode_builder/getdeps.py build --no-tests fmt + - name: Build googletest + run: python3 build/fbcode_builder/getdeps.py build --no-tests googletest + - name: Build xxhash + run: python3 build/fbcode_builder/getdeps.py build --no-tests xxhash + - name: Build zstd + run: python3 build/fbcode_builder/getdeps.py build --no-tests zstd + - name: Build zlib + run: python3 build/fbcode_builder/getdeps.py build --no-tests zlib + - name: Build boost + run: python3 build/fbcode_builder/getdeps.py build --no-tests boost + - name: Build double-conversion + run: python3 build/fbcode_builder/getdeps.py build --no-tests double-conversion + - name: Build fast_float + run: python3 build/fbcode_builder/getdeps.py build --no-tests fast_float + - name: Build gflags + run: python3 build/fbcode_builder/getdeps.py build --no-tests gflags + - name: Build glog + run: python3 build/fbcode_builder/getdeps.py build --no-tests glog + - name: Build libdwarf + run: python3 build/fbcode_builder/getdeps.py build --no-tests libdwarf + - name: Build lz4 + run: python3 build/fbcode_builder/getdeps.py build --no-tests lz4 + - name: Build openssl + run: python3 build/fbcode_builder/getdeps.py build --no-tests openssl + - name: Build snappy + run: python3 build/fbcode_builder/getdeps.py build --no-tests snappy + - name: Build sparsemap + run: python3 build/fbcode_builder/getdeps.py build --no-tests sparsemap + - name: Build liboqs + run: python3 build/fbcode_builder/getdeps.py build --no-tests liboqs + - name: Build libevent + run: python3 build/fbcode_builder/getdeps.py build --no-tests libevent + - name: Build autoconf + run: python3 build/fbcode_builder/getdeps.py build --no-tests autoconf + - name: Build automake + run: python3 build/fbcode_builder/getdeps.py build --no-tests automake + - name: Build libtool + run: python3 build/fbcode_builder/getdeps.py build --no-tests libtool + - name: Build numa + run: python3 build/fbcode_builder/getdeps.py build --no-tests numa + - name: Build libsodium + run: python3 build/fbcode_builder/getdeps.py build --no-tests libsodium + - name: Build xz + run: python3 build/fbcode_builder/getdeps.py build --no-tests xz + - name: Build folly + run: python3 build/fbcode_builder/getdeps.py build --no-tests folly + - name: Build fizz + run: python3 build/fbcode_builder/getdeps.py build --no-tests fizz + - name: Build wangle + run: python3 build/fbcode_builder/getdeps.py build --no-tests wangle + - name: Build mvfst + run: python3 build/fbcode_builder/getdeps.py build --no-tests mvfst + - name: Build fbthrift + run: python3 build/fbcode_builder/getdeps.py build --no-tests fbthrift + - name: Build cachelib + run: python3 build/fbcode_builder/getdeps.py build --src-dir=. cachelib --project-install-prefix cachelib:/usr/local + - name: Copy artifacts + run: python3 build/fbcode_builder/getdeps.py fixup-dyn-deps --src-dir=. cachelib _artifacts/mac --project-install-prefix cachelib:/usr/local --final-install-prefix /usr/local + - uses: actions/upload-artifact@v4 + with: + name: cachelib + path: _artifacts + - name: Test cachelib + run: python3 build/fbcode_builder/getdeps.py test --src-dir=. cachelib --project-install-prefix cachelib:/usr/local diff --git a/.github/workflows/getdeps_windows.yml b/.github/workflows/getdeps_windows.yml new file mode 100644 index 0000000000..671a325588 --- /dev/null +++ b/.github/workflows/getdeps_windows.yml @@ -0,0 +1,161 @@ +# This file was @generated by getdeps.py + +name: windows + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + build: + runs-on: windows-2019 + steps: + - name: Export boost environment + run: "echo BOOST_ROOT=%BOOST_ROOT_1_83_0% >> %GITHUB_ENV%" + shell: cmd + - name: Fix Git config + run: git config --system core.longpaths true + - name: Disable autocrlf + run: git config --system core.autocrlf false + - uses: actions/checkout@v4 + - name: Fetch ninja + run: python build/fbcode_builder/getdeps.py fetch --no-tests ninja + - name: Fetch cmake + run: python build/fbcode_builder/getdeps.py fetch --no-tests cmake + - name: Fetch fmt + run: python build/fbcode_builder/getdeps.py fetch --no-tests fmt + - name: Fetch googletest + run: python build/fbcode_builder/getdeps.py fetch --no-tests googletest + - name: Fetch libsodium + run: python build/fbcode_builder/getdeps.py fetch --no-tests libsodium + - name: Fetch xxhash + run: python build/fbcode_builder/getdeps.py fetch --no-tests xxhash + - name: Fetch zstd + run: python build/fbcode_builder/getdeps.py fetch --no-tests zstd + - name: Fetch zlib + run: python build/fbcode_builder/getdeps.py fetch --no-tests zlib + - name: Fetch boost + run: python build/fbcode_builder/getdeps.py fetch --no-tests boost + - name: Fetch double-conversion + run: python build/fbcode_builder/getdeps.py fetch --no-tests double-conversion + - name: Fetch fast_float + run: python build/fbcode_builder/getdeps.py fetch --no-tests fast_float + - name: Fetch gflags + run: python build/fbcode_builder/getdeps.py fetch --no-tests gflags + - name: Fetch glog + run: python build/fbcode_builder/getdeps.py fetch --no-tests glog + - name: Fetch libdwarf + run: python build/fbcode_builder/getdeps.py fetch --no-tests libdwarf + - name: Fetch lz4 + run: python build/fbcode_builder/getdeps.py fetch --no-tests lz4 + - name: Fetch snappy + run: python build/fbcode_builder/getdeps.py fetch --no-tests snappy + - name: Fetch sparsemap + run: python build/fbcode_builder/getdeps.py fetch --no-tests sparsemap + - name: Fetch jom + run: python build/fbcode_builder/getdeps.py fetch --no-tests jom + - name: Fetch perl + run: python build/fbcode_builder/getdeps.py fetch --no-tests perl + - name: Fetch openssl + run: python build/fbcode_builder/getdeps.py fetch --no-tests openssl + - name: Fetch libevent + run: python build/fbcode_builder/getdeps.py fetch --no-tests libevent + - name: Fetch folly + run: python build/fbcode_builder/getdeps.py fetch --no-tests folly + - name: Fetch liboqs + run: python build/fbcode_builder/getdeps.py fetch --no-tests liboqs + - name: Fetch fizz + run: python build/fbcode_builder/getdeps.py fetch --no-tests fizz + - name: Fetch mvfst + run: python build/fbcode_builder/getdeps.py fetch --no-tests mvfst + - name: Fetch wangle + run: python build/fbcode_builder/getdeps.py fetch --no-tests wangle + - name: Fetch fbthrift + run: python build/fbcode_builder/getdeps.py fetch --no-tests fbthrift + - name: Fetch autoconf + run: python build/fbcode_builder/getdeps.py fetch --no-tests autoconf + - name: Fetch automake + run: python build/fbcode_builder/getdeps.py fetch --no-tests automake + - name: Fetch libtool + run: python build/fbcode_builder/getdeps.py fetch --no-tests libtool + - name: Fetch numa + run: python build/fbcode_builder/getdeps.py fetch --no-tests numa + - name: Build ninja + run: python build/fbcode_builder/getdeps.py build --no-tests ninja + - name: Build cmake + run: python build/fbcode_builder/getdeps.py build --no-tests cmake + - name: Build fmt + run: python build/fbcode_builder/getdeps.py build --no-tests fmt + - name: Build googletest + run: python build/fbcode_builder/getdeps.py build --no-tests googletest + - name: Build libsodium + run: python build/fbcode_builder/getdeps.py build --no-tests libsodium + - name: Build xxhash + run: python build/fbcode_builder/getdeps.py build --no-tests xxhash + - name: Build zstd + run: python build/fbcode_builder/getdeps.py build --no-tests zstd + - name: Build zlib + run: python build/fbcode_builder/getdeps.py build --no-tests zlib + - name: Build boost + run: python build/fbcode_builder/getdeps.py build --no-tests boost + - name: Build double-conversion + run: python build/fbcode_builder/getdeps.py build --no-tests double-conversion + - name: Build fast_float + run: python build/fbcode_builder/getdeps.py build --no-tests fast_float + - name: Build gflags + run: python build/fbcode_builder/getdeps.py build --no-tests gflags + - name: Build glog + run: python build/fbcode_builder/getdeps.py build --no-tests glog + - name: Build libdwarf + run: python build/fbcode_builder/getdeps.py build --no-tests libdwarf + - name: Build lz4 + run: python build/fbcode_builder/getdeps.py build --no-tests lz4 + - name: Build snappy + run: python build/fbcode_builder/getdeps.py build --no-tests snappy + - name: Build sparsemap + run: python build/fbcode_builder/getdeps.py build --no-tests sparsemap + - name: Build jom + run: python build/fbcode_builder/getdeps.py build --no-tests jom + - name: Build perl + run: python build/fbcode_builder/getdeps.py build --no-tests perl + - name: Build openssl + run: python build/fbcode_builder/getdeps.py build --no-tests openssl + - name: Build libevent + run: python build/fbcode_builder/getdeps.py build --no-tests libevent + - name: Build folly + run: python build/fbcode_builder/getdeps.py build --no-tests folly + - name: Build liboqs + run: python build/fbcode_builder/getdeps.py build --no-tests liboqs + - name: Build fizz + run: python build/fbcode_builder/getdeps.py build --no-tests fizz + - name: Build mvfst + run: python build/fbcode_builder/getdeps.py build --no-tests mvfst + - name: Build wangle + run: python build/fbcode_builder/getdeps.py build --no-tests wangle + - name: Build fbthrift + run: python build/fbcode_builder/getdeps.py build --no-tests fbthrift + - name: Build autoconf + run: python build/fbcode_builder/getdeps.py build --no-tests autoconf + - name: Build automake + run: python build/fbcode_builder/getdeps.py build --no-tests automake + - name: Build libtool + run: python build/fbcode_builder/getdeps.py build --no-tests libtool + - name: Build numa + run: python build/fbcode_builder/getdeps.py build --no-tests numa + - name: Build cachelib + run: python build/fbcode_builder/getdeps.py build --src-dir=. cachelib + - name: Copy artifacts + run: python build/fbcode_builder/getdeps.py fixup-dyn-deps --src-dir=. cachelib _artifacts/windows --final-install-prefix /usr/local + - uses: actions/upload-artifact@v4 + with: + name: cachelib + path: _artifacts + - name: Test cachelib + run: python build/fbcode_builder/getdeps.py test --src-dir=. cachelib diff --git a/cachelib/navy/CMakeLists.txt b/cachelib/navy/CMakeLists.txt index 6c99ea885d..d81b67ac3a 100644 --- a/cachelib/navy/CMakeLists.txt +++ b/cachelib/navy/CMakeLists.txt @@ -14,6 +14,8 @@ add_thrift_file(SERIALIZATION serialization/objects.thrift json) +include_directories(${FOLLY_INCLUDE_DIR}) + add_library (cachelib_navy ${SERIALIZATION_THRIFT_FILES} admission_policy/DynamicRandomAP.cpp diff --git a/cachelib/navy/common/Device.cpp b/cachelib/navy/common/Device.cpp index 7e6d5e7ef0..719f3746b5 100644 --- a/cachelib/navy/common/Device.cpp +++ b/cachelib/navy/common/Device.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -901,7 +902,7 @@ std::unique_ptr AsyncIoContext::prepAsyncIo(IOOp& op) { asyncOp = std::make_unique(); #endif } else { - asyncOp = std::make_unique(); + asyncOp = asyncOp.reset(new folly::AsyncIOOp()); } if (req.opType_ == OpType::READ) {