Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b67c3ce
Latest Ruby and spec
seebees Nov 11, 2025
d21fd62
Go
seebees Nov 11, 2025
1a3e1e1
Adding Cpp to submodules
seebees Nov 11, 2025
761dda7
recursive
seebees Nov 11, 2025
7e6d1f2
Add cpp main to submodule
seebees Nov 11, 2025
f070451
Adding cpp and some updates
seebees Nov 11, 2025
a8e4267
simplify submodules
seebees Nov 11, 2025
97b9eab
only cpp recursive
seebees Nov 11, 2025
9674410
More python :(
seebees Nov 11, 2025
13f2d27
update go
seebees Nov 11, 2025
d2ea5e4
updates to the other one.
seebees Nov 11, 2025
e406188
faster CPP init
seebees Nov 11, 2025
fb0c369
maybe faster network
seebees Nov 11, 2025
edb12e1
add short?
seebees Nov 11, 2025
78cbe36
getting out of hand
seebees Nov 11, 2025
b0fbd04
makeing jobs
seebees Nov 11, 2025
33a96ab
try running brew only once
seebees Nov 11, 2025
c8d94d2
Add c++
seebees Nov 11, 2025
81f7cae
better logging for C
seebees Nov 11, 2025
9348dfb
depth 1
seebees Nov 11, 2025
30b435a
Port and make -j
seebees Nov 11, 2025
9037988
CI should be faster
seebees Nov 11, 2025
bd2e098
checkout faster, now with cache!
seebees Nov 11, 2025
d8c7676
Update makefile
seebees Nov 11, 2025
aabee9a
Merge branch 'fireegg-test-servers' into seebees/all-one-iv
seebees Nov 11, 2025
b894708
updates
seebees Nov 11, 2025
434b194
Merge branch 'fireegg-test-servers' into seebees/all-one-iv
seebees Nov 11, 2025
4b11825
move things around
seebees Nov 11, 2025
0f3dc82
update the C makefiles
seebees Nov 11, 2025
bb9173a
update the makefile continuation
seebees Nov 12, 2025
d05dac7
break out the commands
seebees Nov 12, 2025
d75f1bc
try this redirect
seebees Nov 12, 2025
d2b30ee
Break it apart
seebees Nov 12, 2025
406c840
why?
seebees Nov 12, 2025
675cc90
lots of updates
seebees Nov 12, 2025
9af5721
fast build?
seebees Nov 12, 2025
5507648
Merge branch 'fireegg-test-servers' into seebees/all-one-iv
seebees Nov 12, 2025
be62545
add cpp back
seebees Nov 12, 2025
67045d4
Update PHP
seebees Nov 12, 2025
7875a52
Add PHP
seebees Nov 12, 2025
627b322
Merge branch 'fireegg-test-servers' into seebees/all-one-iv
seebees Nov 13, 2025
30a7aea
add .net
seebees Nov 13, 2025
fbfc2fe
only net?
seebees Nov 13, 2025
0346f62
try net
seebees Nov 13, 2025
1e57348
Merge branch 'fireegg-test-servers' into seebees/all-one-iv
seebees Nov 13, 2025
82ee608
try this?
seebees Nov 13, 2025
c185b6e
just move forward
seebees Nov 13, 2025
52f037f
Update test-server/net-v4-server/Makefile
seebees Nov 13, 2025
b977487
Update test-server/net-v2-v3-server/NetV2V3Server.csproj
seebees Nov 13, 2025
931bd4f
remove php
seebees Nov 13, 2025
a322816
Merge branch 'fireegg-test-servers' into all-one-iv
seebees Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 106 additions & 77 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,70 +21,56 @@ jobs:
- name: Checkout code
uses: actions/checkout@v5
with:
submodules: true
submodules: false
# This is Ryan Emery's (seebees) PAT.
# To grant this workflow access to a new private repo,
# ask Ryan to edit this PAT's permissions to add access to a new private repo.
token: ${{ secrets.PAT_FOR_PRIVATE_RUBY }}

- name: Checkout CPP code for cpp-v2-transition
uses: actions/checkout@v5
with:
submodules: recursive
token: ${{ secrets.PAT_FOR_CPP }}
repository: awslabs/aws-sdk-cpp-staging
ref: fire-egg-dev
path: test-server/cpp-v2-transition-server/aws-sdk-cpp/

- name: Checkout CPP code cpp-v3
uses: actions/checkout@v5
with:
submodules: recursive
token: ${{ secrets.PAT_FOR_CPP }}
repository: awslabs/aws-sdk-cpp-staging
ref: fire-egg-dev
path: test-server/cpp-v3-server/aws-sdk-cpp/
# There are a lot of submodules here
# This initializes the checkouts in parallel (--jobs)
# rather than in series the way actions/checkout@v5 does it.

- name: Checkout .NET V2 code
uses: actions/checkout@v5
with:
token: ${{ secrets.PAT_FOR_DOTNET }}
repository: aws/private-amazon-s3-encryption-client-dotnet-staging
# This is the branch for S3EC .NET V2
ref: v3sdk-development
path: test-server/net-v2-v3-server/s3ec-net-v2/
- name: Get CPU count
id: cpu-count
run: echo "count=$(node -p 'require("os").cpus().length')" >> $GITHUB_OUTPUT

- name: Checkout .NET V3 code
uses: actions/checkout@v5
with:
token: ${{ secrets.PAT_FOR_DOTNET }}
repository: aws/private-amazon-s3-encryption-client-dotnet-staging
# This is the branch for S3EC .NET V3
ref: s3ec-v3
path: test-server/net-v2-v3-server/s3ec-net-v3
- name: Setup git submodules with PAT
run: |
git config --global url."https://github.com/".insteadOf "git@github.com:"
git config --global credential.helper store
echo "https://x-token-auth:${{ secrets.PAT_FOR_PRIVATE_RUBY }}@github.com" > ~/.git-credentials

- name: Checkout .NET V3 code (Transition)
uses: actions/checkout@v5
with:
token: ${{ secrets.PAT_FOR_DOTNET }}
repository: aws/private-amazon-s3-encryption-client-dotnet-staging
# This is the branch for S3EC .NET V3 transition
ref: rishav/key-commitment
path: test-server/net-v3-transition-server/s3ec-v3-transition-branch

- name: Checkout .NET V4 (Improved) code
uses: actions/checkout@v5
with:
token: ${{ secrets.PAT_FOR_DOTNET }}
repository: aws/private-amazon-s3-encryption-client-dotnet-staging
# This is the branch for S3EC .NET V4 (improved)
ref: s3ec-v4-WIP
path: test-server/net-v4-server/s3ec-net-v4-improved

- name: Set up Python
uses: actions/setup-python@v5
- name: Cache git submodules
uses: actions/cache@v4
with:
python-version: ${{ inputs.python-version || '3.11' }}
path: |
.git/modules
test-server/*/.git
key: ${{ runner.os }}-submodules-${{ hashFiles('.gitmodules') }}
restore-keys: |
${{ runner.os }}-submodules-

- name: Optimize git for performance
run: |
git config --global fetch.parallel ${{ steps.cpu-count.outputs.count }}
git config --global submodule.fetchJobs ${{ steps.cpu-count.outputs.count }}
git config --global remote.origin.tagOpt --no-tags

- name: Checkout submodules with --jobs
run: |
git submodule update --init --depth 1 --jobs ${{ steps.cpu-count.outputs.count }}

- name: Update cpp submodules recursively with --jobs
run: |
git submodule update --init --recursive \
--depth 1 \
--filter=blob:none \
--jobs ${{ steps.cpu-count.outputs.count }} \
--force \
test-server/cpp-v2-transition-server/aws-sdk-cpp \
test-server/cpp-v3-server/aws-sdk-cpp \
test-server/cpp-v2-server/aws-sdk-cpp

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down Expand Up @@ -116,17 +102,39 @@ jobs:
with:
go-version: 1.25

# Cache uv dependencies
- name: Cache uv dependencies
uses: actions/cache@v3
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('./test-server/python-v3-server/**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-uv-

- name: Install Uv
run: pip install uv
- name: Install C++ dependencies
run: |
brew install libmicrohttpd nlohmann-json ossp-uuid

# Legacy Python tests:
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ inputs.python-version || '3.11' }}
#
# # Cache uv dependencies
# - name: Cache uv dependencies
# uses: actions/cache@v3
# with:
# path: ~/.cache/uv
# key: ${{ runner.os }}-uv-${{ hashFiles('./test-server/python-v3-server/**/pyproject.toml') }}
# restore-keys: |
# ${{ runner.os }}-uv-

# - name: Install Uv
# run: pip install uv

# - name: Install dependencies
# run: make install

# - name: Run unit tests
# run: make test-unit

# - name: Run integration tests
# run: make test-integration
# env:
# CI_S3_BUCKET: ${{ vars.CI_S3_BUCKET }}
# CI_KMS_KEY_ALIAS: ${{ vars.CI_KMS_KEY_ALIAS }}

# Cache Gradle dependencies and build outputs
- name: Cache Gradle packages
Expand All @@ -141,32 +149,53 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

- name: Install dependencies
run: make install

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::370957321024:role/S3EC-Python-Github-test-role
aws-region: us-west-2

- name: Run unit tests
run: make test-unit
- name: Build the servers
run: cd test-server && make build-all-servers FILTER=ruby,go,cpp
env:
MAKEFLAGS: -j${{ steps.cpu-count.outputs.count }}
AWS_REGION: us-west-2

- name: Start the servers
run: cd test-server && make start-all-servers FILTER=ruby,go,cpp
env:
AWS_REGION: us-west-2
TEST_SERVER_S3_BUCKET: ${{ vars.TEST_SERVER_S3_BUCKET }}
TEST_SERVER_KMS_KEY_ARN: ${{ vars.TEST_SERVER_KMS_KEY_ARN }}

- name: Run integration tests
run: make test-integration
- name: Wait for servers to start
run: cd test-server && make wait-all-servers FILTER=ruby,go,cpp
env:
CI_S3_BUCKET: ${{ vars.CI_S3_BUCKET }}
CI_KMS_KEY_ALIAS: ${{ vars.CI_KMS_KEY_ALIAS }}
AWS_REGION: us-west-2
TEST_SERVER_S3_BUCKET: ${{ vars.TEST_SERVER_S3_BUCKET }}
TEST_SERVER_KMS_KEY_ARN: ${{ vars.TEST_SERVER_KMS_KEY_ARN }}

- name: Run test-server tests
run: cd test-server && make ci
- name: Run run-tests
run: cd test-server && make run-tests FILTER=ruby,go,cpp
env:
AWS_REGION: us-west-2
TEST_SERVER_S3_BUCKET: ${{ vars.TEST_SERVER_S3_BUCKET }}
TEST_SERVER_KMS_KEY_ARN: ${{ vars.TEST_SERVER_KMS_KEY_ARN }}
GRADLE_OPTS: "-Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.caching=true"

- name: Upload server logs
if: always()
uses: actions/upload-artifact@v4
with:
name: server-logs
path: |
test-server/*/server.log
test-server/*/net-v2-server.log
test-server/*/net-v3-server.log

- name: Stop the servers
run: cd test-server && make stop-servers FILTER=ruby,go,cpp

- name: Upload results
if: always()
uses: actions/upload-artifact@v4
Expand Down
15 changes: 11 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
url = git@github.com:aws/private-amazon-s3-encryption-client-java-staging.git
branch = imabhichow/add-kc
; branch = s3ec/improved
[submodule "test-server/java-v4-server/specification"]
path = test-server/java-v4-server/specification
url = git@github.com:awslabs/private-aws-encryption-sdk-specification-staging.git
branch = fire-egg-staging
[submodule "test-server/specification"]
path = test-server/specification
url = git@github.com:awslabs/private-aws-encryption-sdk-specification-staging.git
Expand Down Expand Up @@ -56,6 +52,17 @@
path = test-server/net-v3-transition-server/s3ec-v3-transition-branch
url = https://github.com/aws/private-amazon-s3-encryption-client-dotnet-staging.git
branch = rishav/key-commitment
[submodule "test-server/cpp-v2-transition-server/aws-sdk-cpp"]
path = test-server/cpp-v2-transition-server/aws-sdk-cpp
url = git@github.com:awslabs/aws-sdk-cpp-staging.git
branch = fire-egg-dev
[submodule "test-server/cpp-v3-server/aws-sdk-cpp"]
path = test-server/cpp-v3-server/aws-sdk-cpp
url = git@github.com:awslabs/aws-sdk-cpp-staging.git
branch = fire-egg-dev
[submodule "test-server/cpp-v2-server/aws-sdk-cpp"]
path = test-server/cpp-v2-server/aws-sdk-cpp
url = git@github.com:awslabs/aws-sdk-cpp-staging.git
[submodule "all-examples/net/v4/s3ec-v4-local"]
path = all-examples/net/v4/s3ec-v4-local
url = https://github.com/aws/private-amazon-s3-encryption-client-dotnet-staging.git
Expand Down
41 changes: 34 additions & 7 deletions test-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,36 @@
all: start-all-servers wait-all-servers run-tests

# CI target for GitHub Actions
ci: start-servers run-tests stop-servers
ci:
$(MAKE) build-all-servers
$(MAKE) start-all-servers
$(MAKE) wait-all-servers
$(MAKE) run-tests
$(MAKE) stop-servers

SERVER_DIRS := $(shell find . -maxdepth 1 -type d -name '*-server' | sed 's|^\./||' | $(if $(FILTER),grep -E "$$(echo '$(FILTER)' | sed 's/,/|/g')",cat) | sort)

BUILD_SERVER_TARGETS := $(addprefix build-, $(SERVER_DIRS))
START_SERVER_TARGETS := $(addprefix start-, $(SERVER_DIRS))
WAIT_SERVER_TARGETS := $(addprefix wait-, $(SERVER_DIRS))

# Start all servers in parallel
# Build all servers in parallel
build-all-servers: export MAKEFLAGS=-j$(shell sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null || echo 1)
build-all-servers: $(BUILD_SERVER_TARGETS)

$(BUILD_SERVER_TARGETS): build-%:
@if [ -f $*/Makefile ]; then \
echo "Building server in $*..."; \
$(MAKE) -C $* build-server; \
else \
echo "❌ Error: no Makefile found in $*"; \
exit 1; \
fi

# Build and start all servers
start-servers:
@echo "Building all servers..."
$(MAKE) build-all-servers
@echo "Starting all servers..."
$(MAKE) start-all-servers
@echo "Waiting for servers to start..."
Expand All @@ -23,7 +44,9 @@ start-servers:
$(MAKE) -C $$dir wait-for-server; \
done

start-all-servers: $(START_SERVER_TARGETS)
# Start servers sequentially (no parallel execution)
start-all-servers:
@$(MAKE) MAKEFLAGS= $(START_SERVER_TARGETS)

$(START_SERVER_TARGETS): start-%:
@if [ -f $*/Makefile ]; then \
Expand All @@ -32,9 +55,12 @@ $(START_SERVER_TARGETS): start-%:
else \
echo "❌ Error: no Makefile found in $*"; \
exit 1; \
fi; \
fi;

wait-all-servers: $(WAIT_SERVER_TARGETS)
wait-all-servers:
@echo "Waiting for all servers to be ready..."
$(MAKE) $(WAIT_SERVER_TARGETS)
@echo "All servers are ready!"

$(WAIT_SERVER_TARGETS): wait-%:
@if [ -f $*/Makefile ]; then \
Expand All @@ -43,7 +69,7 @@ $(WAIT_SERVER_TARGETS): wait-%:
else \
echo "❌ Error: no Makefile found in $*"; \
exit 1; \
fi; \
fi;


# Run the Java tests
Expand All @@ -63,7 +89,7 @@ run-tests:
stop-servers:
@echo "Stopping servers..."
@for dir in $(SERVER_DIRS); do \
echo "Starting server in $$dir..."; \
echo "Stopping server in $$dir..."; \
$(MAKE) -C $$dir stop-server; \
done
@echo "Servers stopped"
Expand Down Expand Up @@ -94,6 +120,7 @@ wait-for-port:
echo "❌ Error: PORT is required"; \
exit 1; \
fi
@echo "Starting to wait for $$PORT to start";
@for i in $$(seq 1 $(TIMEOUT)); do \
if nc -z localhost $$PORT; then \
echo "Ports are open, waiting for servers to initialize..."; \
Expand Down
25 changes: 16 additions & 9 deletions test-server/cpp-v2-server/Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
# Makefile for S3 Encryption Client Testing

.PHONY: start-server stop-server wait-for-server
.PHONY: build-server start-server stop-server wait-for-server

PID_FILE := server.pid
PORT := 8085

build/s3ec-server:
brew install libmicrohttpd nlohmann-json ossp-uuid
git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git
build/s3ec-server:
cd aws-sdk-cpp
mkdir -p build && cd build && cmake ..

start-server: | build/s3ec-server
build-server: | build/s3ec-server
@echo "Building Cpp V2 server..."
cd build && make

start-server:
@echo "Starting Cpp V2 server..."
cd build && make && \
cd build && \
AWS_ACCESS_KEY_ID="$$AWS_ACCESS_KEY_ID" \
AWS_SECRET_ACCESS_KEY="$$AWS_SECRET_ACCESS_KEY" \
AWS_SESSION_TOKEN="$$AWS_SESSION_TOKEN" \
AWS_REGION="us-west-2" \
./s3ec-server & echo $$! > $(PID_FILE)
./s3ec-server > server.log 2>&1 & echo $$! > ../$(PID_FILE)
@echo "Cpp V2 server starting..."

stop-server:
@echo "Stopping server on port $(PORT)..."
@lsof -ti:$(PORT) | xargs kill -9 2>/dev/null || true
@if [ -f $(PID_FILE) ]; then \
kill $$(cat $(PID_FILE)) 2>/dev/null || true; \
rm $(PID_FILE); \
pkill -P $$(cat $(PID_FILE)) 2>/dev/null || true; \
kill -9 $$(cat $(PID_FILE)) 2>/dev/null || true; \
rm -f $(PID_FILE); \
fi
@rm -f build/server.log
@echo "Server stopped"

wait-for-server:
$(MAKE) -C .. wait-for-port PORT=$(PORT)
1 change: 1 addition & 0 deletions test-server/cpp-v2-server/aws-sdk-cpp
Submodule aws-sdk-cpp added at 994384
Loading
Loading