Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

cmake: workaround _num_cores being 0 under qemu emulation #343

cmake: workaround _num_cores being 0 under qemu emulation

cmake: workaround _num_cores being 0 under qemu emulation #343

Workflow file for this run

---
name: Test s3gw
on:
pull_request:
branches:
- "s3gw"
push:
branches:
ci/s3tests-results
tags:
- "s3gw-v*"
# This is useful when rebasing
workflow_dispatch:
env:
CMAKE_BUILD_TYPE: Debug
NPROC: 16
# Note: max 128 chars according to OCI Distribution Spec
IMAGE_TAG: ${{ github.workflow_sha }}-${{ github.run_id }}-${{ github.run_attempt }}
jobs:
tests:
runs-on: self-hosted
steps:
- name: Checkout ceph
uses: actions/checkout@v3
with:
path: ceph
submodules: recursive
- name: Checkout s3gw
uses: actions/checkout@v3
with:
repository: aquarist-labs/s3gw
path: s3gw
submodules: false
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
s3cmd
python3 -m pip install -r ceph/qa/rgw/store/sfs/tests/requirements.txt
- name: Build Unittests
run: |
docker build \
--build-arg CMAKE_BUILD_TYPE=Debug \
--build-arg NPROC=16 \
--file s3gw/Dockerfile \
--tag s3gw-unittests:${IMAGE_TAG} \
--target s3gw-unittests \
.
- name: Run Unittests
run: |
docker run --rm s3gw-unittests:${IMAGE_TAG}
- name: Build s3gw Container Image
run: |
docker build \
--build-arg CMAKE_BUILD_TYPE=Debug \
--build-arg NPROC=16 \
--build-arg SRC_S3GW_DIR=s3gw \
--file s3gw/Dockerfile \
--tag s3gw:${IMAGE_TAG} \
.
- name: Run Integration tests
run: |
set -e
set -x
source ceph/qa/rgw/store/sfs/tests/helpers.sh
mkdir -p integration/storage
CONTAINER=$(docker run --rm -d \
-p 7480:7480 \
-v $GITHUB_WORKSPACE/integration/storage:/data \
s3gw:${IMAGE_TAG} \
--debug low \
-- \
--rgw-lc-debug-interval 10)
wait_for_http_200 "http://127.0.0.1:7480"
echo "Running Integration Tests:"
cd ceph/qa/rgw/store/sfs/tests
python3 -m unittest -v test-*.py
docker kill $CONTAINER
- name: Run smoke tests
run: |
set -e
set -x
source ceph/qa/rgw/store/sfs/tests/helpers.sh
mkdir -p smoke/storage
CONTAINER=$(docker run --rm -d \
-p 7480:7480 \
-v $GITHUB_WORKSPACE/smoke/storage:/data \
s3gw:${IMAGE_TAG} \
--debug low)
wait_for_http_200 "http://127.0.0.1:7480"
echo "Running Smoke Tests:"
cd ceph/qa/rgw/store/sfs/tests
./sfs-smoke-test.sh 127.0.0.1:7480
docker kill $CONTAINER
- name: Run S3 Tests
run: |
set -x
docker run --rm \
-v /run/docker.sock:/run/docker.sock \
-v ${GITHUB_WORKSPACE}/s3tr-out:/out \
--pull=always \
ghcr.io/aquarist-labs/s3tr:latest \
run \
--image s3gw:${IMAGE_TAG} \
--docker-api unix:///run/docker.sock \
--nproc 10 \
/out/s3tr.json
- name: Archive Results
uses: actions/upload-artifact@v3
with:
name: s3tests-results-${{ github.workflow_sha }}-${{ github.run_id }}-${{ github.run_attempt }}
path: s3tr-out/s3tr.json
- name: Analyze Results
run: |
set -x
docker run --rm \
-v ${GITHUB_WORKSPACE}/s3tr-out:/out \
-v ${GITHUB_WORKSPACE}/ceph:/ceph:ro \
ghcr.io/aquarist-labs/s3tr:latest \
analyze summary \
/out/s3tr.json \
/ceph/qa/rgw/store/sfs/tests/fixtures/s3tr_excuses.csv