build: TOOLS-2981 Remove deprecated macos-12 #566
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 All | |
on: | |
push: | |
branches: [ master, test-ready, ] | |
pull_request: | |
branches: [ master, test-ready, "bugfix/*" ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
env: | |
ASREPO: ${{ github.workspace }}/server | |
AWS_SDK_STATIC_PATH: /usr/local/lib | |
AWS_SDK_CPP_VERSION: 1.10.55 | |
EVENT_LIB: libuv | |
ZSTD_VERSION: 1.4.9 | |
steps: | |
- name: install libuv | |
id: install-libuv | |
run: | | |
sudo apt update -y | |
sudo apt install -y libuv1-dev | |
- name: install lcov | |
id: install-lcov | |
run: | | |
sudo apt install -y lcov | |
- name: install Valgrind | |
id: install-valgrind | |
run: | | |
sudo apt install -y valgrind | |
- name: install secret agent client requirements | |
id: install-secret-agent-client-requirements | |
run: | | |
sudo apt install -y libjansson-dev | |
- name: install AWS requirements | |
id: install-aws-requirements | |
run: | | |
sudo apt install -y libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev libpulse-dev | |
- name: Cache AWS C++ sdk | |
id: cache-aws-sdk-cpp | |
uses: actions/cache@v3 | |
env: | |
cache-name: aws-sdk-cpp | |
with: | |
path: aws-sdk-cpp | |
key: aws-sdk-cpp-build-and-test-${{ env.AWS_SDK_CPP_VERSION }}-${{ runner.os }} | |
- name: Download AWS C++ sdk | |
uses: actions/checkout@v3 | |
if: steps.cache-aws-sdk-cpp.outputs.cache-hit != 'true' | |
with: | |
repository: aws/aws-sdk-cpp | |
submodules: recursive | |
ref: ${{ env.AWS_SDK_CPP_VERSION }} | |
path: aws-sdk-cpp | |
- name: Build AWS C++ sdk | |
if: steps.cache-aws-sdk-cpp.outputs.cache-hit != 'true' | |
run: | | |
mkdir aws-sdk-cpp/build | |
cd aws-sdk-cpp/build | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="s3" -DBUILD_SHARED_LIBS=OFF -DENABLE_TESTING=OFF -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_LIBDIR=lib | |
make | |
- name: Install AWS C++ sdk | |
run: | | |
cd aws-sdk-cpp/build | |
sudo make install | |
- name: Download zstd | |
uses: actions/checkout@v3 | |
with: | |
repository: facebook/zstd | |
submodules: recursive | |
ref: v${{ env.ZSTD_VERSION }} | |
path: zstd-${{ env.ZSTD_VERSION }} | |
- name: Cache zstd | |
id: cache-zstd | |
uses: actions/cache@v3 | |
env: | |
cache-name: zstd | |
with: | |
path: zstd-${{ env.ZSTD_VERSION }} | |
key: zstd-${{ env.ZSTD_VERSION }}-${{ runner.os }} | |
- name: Build zstd | |
id: build-zstd | |
if: steps.cache-zstd.outputs.cache-hit != 'true' | |
run: | | |
cd zstd-${{ env.ZSTD_VERSION }} | |
make | |
- name: install zstd | |
run: | | |
cd zstd-${{ env.ZSTD_VERSION }} | |
sudo make install | |
- name: Download libcheck | |
uses: dsaltares/[email protected] | |
with: | |
repo: "libcheck/check" | |
version: "tags/0.15.2" | |
file: check-0.15.2.tar.gz | |
- name: Cache libcheck | |
id: cache-libcheck | |
uses: actions/cache@v3 | |
env: | |
cache-name: libcheck | |
with: | |
path: check-0.15.2 | |
key: check-0.15.2-${{ runner.os }} | |
- name: Build libcheck | |
id: build-libcheck | |
if: steps.cache-libcheck.outputs.cache-hit != 'true' | |
run: | | |
tar xvfz check-0.15.2.tar.gz && cd check-0.15.2 | |
./configure | |
make | |
- name: install libcheck | |
run: | | |
cd check-0.15.2 | |
sudo make install | |
sudo ldconfig | |
- name: Checkout c client | |
uses: actions/checkout@v3 | |
with: | |
repository: aerospike/aerospike-client-c | |
submodules: recursive | |
ref: 6.0.0 | |
path: client | |
- name: Build client lib | |
run: make | |
working-directory: client | |
- name: Checkout asbackup | |
uses: actions/checkout@v3 | |
with: | |
path: main | |
submodules: recursive | |
- name: Info | |
run: make info | |
working-directory: main | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Initialize codecov | |
run: make coverage-init | |
working-directory: main | |
- name: Unit Test | |
run: make unit | |
working-directory: main | |
# - name: Set cores to get stored in /cores | |
# run: | | |
# sudo mkdir /cores | |
# sudo chmod 777 /cores | |
# # Core filenames will be of the form executable.pid.timestamp: | |
# sudo bash -c 'echo "/cores/%e.%p.%t" > /proc/sys/kernel/core_pattern' | |
- name: Test secret agent | |
run: | | |
make run_test_secrets | |
working-directory: main | |
- name: Test secrets | |
run: | | |
make run_test_secret_agent | |
working-directory: main | |
# - name: Enable core directories | |
# if: fails() | |
# run: sudo chmod -R +rwx /cores/* # Enable access to core dumps (doesn't need to be in same run block) | |
# - name: Setup tmate session | |
# if: fails() | |
# uses: mxschmitt/action-tmate@v3 | |
# - uses: actions/upload-artifact@master # capture all crashes as build artifacts | |
# if: fails() | |
# with: | |
# name: crashes | |
# path: /cores | |
- name: Test Validate | |
run: make run_test_validate | |
working-directory: main | |
- name: Test Bin Name | |
run: make run_test_bin_name | |
working-directory: main | |
- name: Test asbackup/asrestore with Valgrind | |
run: make run_test_w_valgrind | |
working-directory: main | |
- name: Test Set Name | |
run: make run_test_set_name | |
working-directory: main | |
- name: Test Key | |
run: make run_test_key | |
working-directory: main | |
- name: Test Value | |
run: make run_test_value | |
working-directory: main | |
- name: Test Index | |
run: make run_test_index | |
working-directory: main | |
- name: Test UDF | |
run: make run_test_udf | |
working-directory: main | |
- name: Test TTL | |
run: make run_test_ttl | |
working-directory: main | |
- name: Test Policy | |
run: make run_test_policy | |
working-directory: main | |
- name: Test Filter | |
run: make run_test_filter | |
working-directory: main | |
- name: Test Resume | |
run: make run_test_resume | |
working-directory: main | |
- name: Test S3 | |
run: make run_test_s3 | |
working-directory: main | |
- name: Accumulate coverage | |
run: make coverage | |
working-directory: main | |
- name: Report coverage | |
run: make report | |
working-directory: main | |
- name: clear temp directories | |
run: | | |
rm -rf client | |
rm -rf main/target | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
verbose: false | |
directory: main/test_target | |
files: main/test_target/aerospike-tools-backup.info | |