@@ -47,150 +47,12 @@ jobs:
4747 - name : Pull latest Docker image
4848 run : docker pull trainiteu/mp-units:latest
4949
50- - name : Test Dev Container Build and mp-units Development Workflow
50+ - name : Test Dev Container Build and Setup
5151 uses : devcontainers/ci@v0.3.1900000417
5252 with :
5353 imageName : mp-units-dev
5454 cacheFrom : mp-units-dev
5555 push : never
5656 runCmd : |
57- set -e # Exit on any error
58-
59- echo "🧪 Testing mp-units development environment..."
60- echo "📋 Verifying base tools and compilers:"
61-
62- # Check essential tools are available
63- tools=(gcc g++ clang clang++ cmake ninja conan python3 git pre-commit)
64- for tool in "${tools[@]}"; do
65- if command -v "$tool" >/dev/null 2>&1; then
66- echo "✅ $tool: $(command -v "$tool")"
67- else
68- echo "❌ $tool: NOT FOUND"
69- exit 1
70- fi
71- done
72-
73- echo ""
74- echo "📋 Compiler matrix verification:"
75- echo "Available GCC versions: $(ls /usr/bin/gcc-* | grep -E 'gcc-[0-9]+$' | sort -V | tr '\n' ' ')"
76- echo "Available Clang versions: $(ls /usr/bin/clang++-* /usr/local/bin/clang++-* 2>/dev/null | grep -E 'clang\+\+-[0-9]+$' | sort -V | tr '\n' ' ')"
77-
78- # Test specific compiler versions expected for mp-units
79- echo ""
80- echo "🧪 Testing specific compiler versions:"
81-
82- # Expected GCC versions (12, 13, 14, 15)
83- expected_gcc=(12 13 14 15)
84- for version in "${expected_gcc[@]}"; do
85- if command -v "gcc-$version" >/dev/null 2>&1 && command -v "g++-$version" >/dev/null 2>&1; then
86- gcc_ver=$(gcc-$version --version | head -1)
87- echo "✅ GCC-$version: $gcc_ver"
88- else
89- echo "❌ GCC-$version: NOT FOUND"
90- exit 1
91- fi
92- done
93-
94- # Expected Clang versions (16, 17, 18, 19, 20)
95- expected_clang=(16 17 18 19 20)
96- for version in "${expected_clang[@]}"; do
97- if command -v "clang-$version" >/dev/null 2>&1 && command -v "clang++-$version" >/dev/null 2>&1; then
98- clang_ver=$(clang-$version --version | head -1)
99- echo "✅ Clang-$version: $clang_ver"
100- else
101- echo "❌ Clang-$version: NOT FOUND"
102- exit 1
103- fi
104- done
105-
106- echo ""
107- echo "🔧 Default tool versions:"
108- gcc --version | head -1
109- clang --version | head -1
110- cmake --version | head -1
111- ninja --version
112- python3 --version
113- conan --version
114-
115- echo ""
116- echo "📦 Conan configuration validation:"
117- conan profile list
118-
119- # Verify expected Conan profiles exist
120- expected_profiles=(gcc12 gcc13 gcc14 clang16 clang17 clang18 clang20)
121- for profile in "${expected_profiles[@]}"; do
122- if conan profile show "$profile" >/dev/null 2>&1; then
123- echo "✅ Profile $profile: available"
124- else
125- echo "❌ Profile $profile: MISSING"
126- exit 1
127- fi
128- done
129-
130- echo ""
131- echo "🏗️ Testing mp-units comprehensive setup with check_all.sh:"
132-
133- # Run the comprehensive installation and validation script
134- echo "Running check_all.sh install to validate all compiler configurations..."
135- if .devcontainer/check_all.sh install; then
136- echo "✅ check_all.sh install completed successfully"
137- echo "✅ All compiler profiles validated and dependencies installed"
138- else
139- echo "❌ check_all.sh install failed"
140- exit 1
141- fi
142-
143- echo ""
144- echo "🎯 Testing quick build validation:"
145- # Test one quick build to ensure the environment actually works
146- echo "Testing quick build with Clang-20..."
147- if conan create . -pr clang20 -c user.mp-units.build:all=False -s compiler.cppstd=23 -b missing; then
148- echo "✅ Quick build test passed"
149- else
150- echo "❌ Quick build test failed"
151- exit 1
152- fi
153-
154- echo ""
155- echo "📖 Testing documentation tools:"
156- if command -v mkdocs >/dev/null 2>&1; then
157- echo "✅ MkDocs: $(mkdocs --version)"
158- # Test mkdocs configuration
159- if mkdocs build --strict --quiet; then
160- echo "✅ Documentation builds successfully"
161- else
162- echo "❌ Documentation build failed"
163- exit 1
164- fi
165- else
166- echo "❌ MkDocs: NOT FOUND"
167- exit 1
168- fi
169-
170- echo ""
171- echo "🎯 Testing API reference setup:"
172- if [ -f ".devcontainer/api_reference.sh" ]; then
173- echo "✅ API reference script exists"
174- # Test setup-only mode
175- if .devcontainer/api_reference.sh -s; then
176- echo "✅ API reference setup completed"
177- else
178- echo "❌ API reference setup failed"
179- exit 1
180- fi
181- else
182- echo "❌ API reference script missing"
183- exit 1
184- fi
185-
186- echo ""
187- echo "🧹 Testing code quality tools:"
188- if pre-commit --version >/dev/null 2>&1; then
189- echo "✅ pre-commit: $(pre-commit --version)"
190- else
191- echo "❌ pre-commit: NOT FOUND"
192- exit 1
193- fi
194-
195- echo ""
196- echo "🎉 All tests passed! Development environment is ready for mp-units development."
57+ echo "✅ Devcontainer build and setup completed successfully"
58+ echo "Validation was performed during postCreateCommand"
0 commit comments