mirror of
https://github.com/mpusz/mp-units.git
synced 2026-02-06 23:34:28 +01:00
ci: pulling docker image forced for "Codespaces Test" workflow
This commit is contained in:
@@ -84,4 +84,4 @@
|
||||
"onAutoForward": "notify"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
263
.github/workflows/codespaces-test.yml
vendored
263
.github/workflows/codespaces-test.yml
vendored
@@ -26,11 +26,11 @@ on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- '.devcontainer/**'
|
||||
- '.github/workflows/codespaces-test.yml'
|
||||
- ".devcontainer/**"
|
||||
- ".github/workflows/codespaces-test.yml"
|
||||
schedule:
|
||||
# Test weekly to catch base image changes
|
||||
- cron: '0 6 * * 1'
|
||||
- cron: "0 6 * * 1"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -41,153 +41,156 @@ jobs:
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Test Dev Container Build and mp-units Development Workflow
|
||||
uses: devcontainers/ci@v0.3.1900000417
|
||||
with:
|
||||
imageName: mp-units-dev
|
||||
cacheFrom: mp-units-dev
|
||||
push: never
|
||||
runCmd: |
|
||||
set -e # Exit on any error
|
||||
- name: Pull latest Docker image
|
||||
run: docker pull trainiteu/mp-units:latest
|
||||
|
||||
echo "🧪 Testing mp-units development environment..."
|
||||
echo "📋 Verifying base tools and compilers:"
|
||||
- name: Test Dev Container Build and mp-units Development Workflow
|
||||
uses: devcontainers/ci@v0.3.1900000417
|
||||
with:
|
||||
imageName: mp-units-dev
|
||||
cacheFrom: mp-units-dev
|
||||
push: never
|
||||
runCmd: |
|
||||
set -e # Exit on any error
|
||||
|
||||
# Check essential tools are available
|
||||
tools=(gcc g++ clang clang++ cmake ninja conan python3 git pre-commit)
|
||||
for tool in "${tools[@]}"; do
|
||||
if command -v "$tool" >/dev/null 2>&1; then
|
||||
echo "✅ $tool: $(command -v "$tool")"
|
||||
echo "🧪 Testing mp-units development environment..."
|
||||
echo "📋 Verifying base tools and compilers:"
|
||||
|
||||
# Check essential tools are available
|
||||
tools=(gcc g++ clang clang++ cmake ninja conan python3 git pre-commit)
|
||||
for tool in "${tools[@]}"; do
|
||||
if command -v "$tool" >/dev/null 2>&1; then
|
||||
echo "✅ $tool: $(command -v "$tool")"
|
||||
else
|
||||
echo "❌ $tool: NOT FOUND"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "📋 Compiler matrix verification:"
|
||||
echo "Available GCC versions: $(ls /usr/bin/gcc-* | grep -E 'gcc-[0-9]+$' | sort -V | tr '\n' ' ')"
|
||||
echo "Available Clang versions: $(ls /usr/bin/clang++-* /usr/local/bin/clang++-* 2>/dev/null | grep -E 'clang\+\+-[0-9]+$' | sort -V | tr '\n' ' ')"
|
||||
|
||||
# Test specific compiler versions expected for mp-units
|
||||
echo ""
|
||||
echo "🧪 Testing specific compiler versions:"
|
||||
|
||||
# Expected GCC versions (12, 13, 14, 15)
|
||||
expected_gcc=(12 13 14 15)
|
||||
for version in "${expected_gcc[@]}"; do
|
||||
if command -v "gcc-$version" >/dev/null 2>&1 && command -v "g++-$version" >/dev/null 2>&1; then
|
||||
gcc_ver=$(gcc-$version --version | head -1)
|
||||
echo "✅ GCC-$version: $gcc_ver"
|
||||
else
|
||||
echo "❌ GCC-$version: NOT FOUND"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Expected Clang versions (16, 17, 18, 19, 20)
|
||||
expected_clang=(16 17 18 19 20)
|
||||
for version in "${expected_clang[@]}"; do
|
||||
if command -v "clang-$version" >/dev/null 2>&1 && command -v "clang++-$version" >/dev/null 2>&1; then
|
||||
clang_ver=$(clang-$version --version | head -1)
|
||||
echo "✅ Clang-$version: $clang_ver"
|
||||
else
|
||||
echo "❌ Clang-$version: NOT FOUND"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "🔧 Default tool versions:"
|
||||
gcc --version | head -1
|
||||
clang --version | head -1
|
||||
cmake --version | head -1
|
||||
ninja --version
|
||||
python3 --version
|
||||
conan --version
|
||||
|
||||
echo ""
|
||||
echo "📦 Conan configuration validation:"
|
||||
conan profile list
|
||||
|
||||
# Verify expected Conan profiles exist
|
||||
expected_profiles=(gcc12 gcc13 gcc14 clang16 clang17 clang18 clang20)
|
||||
for profile in "${expected_profiles[@]}"; do
|
||||
if conan profile show "$profile" >/dev/null 2>&1; then
|
||||
echo "✅ Profile $profile: available"
|
||||
else
|
||||
echo "❌ Profile $profile: MISSING"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "🏗️ Testing mp-units comprehensive setup with check_all.sh:"
|
||||
|
||||
# Run the comprehensive installation and validation script
|
||||
echo "Running check_all.sh install to validate all compiler configurations..."
|
||||
if .devcontainer/check_all.sh install; then
|
||||
echo "✅ check_all.sh install completed successfully"
|
||||
echo "✅ All compiler profiles validated and dependencies installed"
|
||||
else
|
||||
echo "❌ $tool: NOT FOUND"
|
||||
echo "❌ check_all.sh install failed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "📋 Compiler matrix verification:"
|
||||
echo "Available GCC versions: $(ls /usr/bin/gcc-* | grep -E 'gcc-[0-9]+$' | sort -V | tr '\n' ' ')"
|
||||
echo "Available Clang versions: $(ls /usr/bin/clang++-* /usr/local/bin/clang++-* 2>/dev/null | grep -E 'clang\+\+-[0-9]+$' | sort -V | tr '\n' ' ')"
|
||||
|
||||
# Test specific compiler versions expected for mp-units
|
||||
echo ""
|
||||
echo "🧪 Testing specific compiler versions:"
|
||||
|
||||
# Expected GCC versions (12, 13, 14, 15)
|
||||
expected_gcc=(12 13 14 15)
|
||||
for version in "${expected_gcc[@]}"; do
|
||||
if command -v "gcc-$version" >/dev/null 2>&1 && command -v "g++-$version" >/dev/null 2>&1; then
|
||||
gcc_ver=$(gcc-$version --version | head -1)
|
||||
echo "✅ GCC-$version: $gcc_ver"
|
||||
echo ""
|
||||
echo "🎯 Testing quick build validation:"
|
||||
# Test one quick build to ensure the environment actually works
|
||||
echo "Testing quick build with Clang-20..."
|
||||
if conan create . -pr clang20 -c user.mp-units.build:all=False -s compiler.cppstd=23 -b missing; then
|
||||
echo "✅ Quick build test passed"
|
||||
else
|
||||
echo "❌ GCC-$version: NOT FOUND"
|
||||
echo "❌ Quick build test failed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Expected Clang versions (16, 17, 18, 19, 20)
|
||||
expected_clang=(16 17 18 19 20)
|
||||
for version in "${expected_clang[@]}"; do
|
||||
if command -v "clang-$version" >/dev/null 2>&1 && command -v "clang++-$version" >/dev/null 2>&1; then
|
||||
clang_ver=$(clang-$version --version | head -1)
|
||||
echo "✅ Clang-$version: $clang_ver"
|
||||
echo ""
|
||||
echo "📖 Testing documentation tools:"
|
||||
if command -v mkdocs >/dev/null 2>&1; then
|
||||
echo "✅ MkDocs: $(mkdocs --version)"
|
||||
# Test mkdocs configuration
|
||||
if mkdocs build --strict --quiet; then
|
||||
echo "✅ Documentation builds successfully"
|
||||
else
|
||||
echo "❌ Documentation build failed"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "❌ Clang-$version: NOT FOUND"
|
||||
echo "❌ MkDocs: NOT FOUND"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "🔧 Default tool versions:"
|
||||
gcc --version | head -1
|
||||
clang --version | head -1
|
||||
cmake --version | head -1
|
||||
ninja --version
|
||||
python3 --version
|
||||
conan --version
|
||||
|
||||
echo ""
|
||||
echo "📦 Conan configuration validation:"
|
||||
conan profile list
|
||||
|
||||
# Verify expected Conan profiles exist
|
||||
expected_profiles=(gcc12 gcc13 gcc14 clang16 clang17 clang18 clang20)
|
||||
for profile in "${expected_profiles[@]}"; do
|
||||
if conan profile show "$profile" >/dev/null 2>&1; then
|
||||
echo "✅ Profile $profile: available"
|
||||
echo ""
|
||||
echo "🎯 Testing API reference setup:"
|
||||
if [ -f ".devcontainer/api_reference.sh" ]; then
|
||||
echo "✅ API reference script exists"
|
||||
# Test setup-only mode
|
||||
if .devcontainer/api_reference.sh -s; then
|
||||
echo "✅ API reference setup completed"
|
||||
else
|
||||
echo "❌ API reference setup failed"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "❌ Profile $profile: MISSING"
|
||||
echo "❌ API reference script missing"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "🏗️ Testing mp-units comprehensive setup with check_all.sh:"
|
||||
|
||||
# Run the comprehensive installation and validation script
|
||||
echo "Running check_all.sh install to validate all compiler configurations..."
|
||||
if .devcontainer/check_all.sh install; then
|
||||
echo "✅ check_all.sh install completed successfully"
|
||||
echo "✅ All compiler profiles validated and dependencies installed"
|
||||
else
|
||||
echo "❌ check_all.sh install failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "🎯 Testing quick build validation:"
|
||||
# Test one quick build to ensure the environment actually works
|
||||
echo "Testing quick build with Clang-20..."
|
||||
if conan create . -pr clang20 -c user.mp-units.build:all=False -s compiler.cppstd=23 -b missing; then
|
||||
echo "✅ Quick build test passed"
|
||||
else
|
||||
echo "❌ Quick build test failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "📖 Testing documentation tools:"
|
||||
if command -v mkdocs >/dev/null 2>&1; then
|
||||
echo "✅ MkDocs: $(mkdocs --version)"
|
||||
# Test mkdocs configuration
|
||||
if mkdocs build --strict --quiet; then
|
||||
echo "✅ Documentation builds successfully"
|
||||
echo ""
|
||||
echo "🧹 Testing code quality tools:"
|
||||
if pre-commit --version >/dev/null 2>&1; then
|
||||
echo "✅ pre-commit: $(pre-commit --version)"
|
||||
else
|
||||
echo "❌ Documentation build failed"
|
||||
echo "❌ pre-commit: NOT FOUND"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "❌ MkDocs: NOT FOUND"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "🎯 Testing API reference setup:"
|
||||
if [ -f ".devcontainer/api_reference.sh" ]; then
|
||||
echo "✅ API reference script exists"
|
||||
# Test setup-only mode
|
||||
if .devcontainer/api_reference.sh -s; then
|
||||
echo "✅ API reference setup completed"
|
||||
else
|
||||
echo "❌ API reference setup failed"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "❌ API reference script missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "🧹 Testing code quality tools:"
|
||||
if pre-commit --version >/dev/null 2>&1; then
|
||||
echo "✅ pre-commit: $(pre-commit --version)"
|
||||
else
|
||||
echo "❌ pre-commit: NOT FOUND"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "🎉 All tests passed! Development environment is ready for mp-units development."
|
||||
echo ""
|
||||
echo "🎉 All tests passed! Development environment is ready for mp-units development."
|
||||
|
||||
Reference in New Issue
Block a user