2626 workflow_dispatch :
2727 push :
2828 paths :
29- - ' .devcontainer/**'
30- - ' .github/workflows/codespaces-test.yml'
29+ - " .devcontainer/**"
30+ - " .github/workflows/codespaces-test.yml"
3131 schedule :
3232 # Test weekly to catch base image changes
33- - cron : ' 0 6 * * 1'
33+ - cron : " 0 6 * * 1"
3434
3535permissions :
3636 contents : read
@@ -41,153 +41,156 @@ jobs:
4141 timeout-minutes : 60
4242
4343 steps :
44- - name : Checkout
45- uses : actions/checkout@v4
46-
47- - name : Test Dev Container Build and mp-units Development Workflow
48- uses : devcontainers/ci@v0.3.1900000417
49- with :
50- imageName : mp-units-dev
51- cacheFrom : mp-units-dev
52- push : never
53- runCmd : |
54- set -e # Exit on any error
55-
56- echo "🧪 Testing mp-units development environment..."
57- echo "📋 Verifying base tools and compilers:"
58-
59- # Check essential tools are available
60- tools=(gcc g++ clang clang++ cmake ninja conan python3 git pre-commit)
61- for tool in "${tools[@]}"; do
62- if command -v "$tool" >/dev/null 2>&1; then
63- echo "✅ $tool: $(command -v "$tool")"
44+ - name : Checkout
45+ uses : actions/checkout@v4
46+
47+ - name : Pull latest Docker image
48+ run : docker pull trainiteu/mp-units:latest
49+
50+ - name : Test Dev Container Build and mp-units Development Workflow
51+ uses : devcontainers/ci@v0.3.1900000417
52+ with :
53+ imageName : mp-units-dev
54+ cacheFrom : mp-units-dev
55+ push : never
56+ 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"
64138 else
65- echo "❌ $tool: NOT FOUND "
139+ echo "❌ check_all.sh install failed "
66140 exit 1
67141 fi
68- done
69-
70- echo ""
71- echo "📋 Compiler matrix verification:"
72- echo "Available GCC versions: $(ls /usr/bin/gcc-* | grep -E 'gcc-[0-9]+$' | sort -V | tr '\n' ' ')"
73- echo "Available Clang versions: $(ls /usr/bin/clang++-* /usr/local/bin/clang++-* 2>/dev/null | grep -E 'clang\+\+-[0-9]+$' | sort -V | tr '\n' ' ')"
74-
75- # Test specific compiler versions expected for mp-units
76- echo ""
77- echo "🧪 Testing specific compiler versions:"
78-
79- # Expected GCC versions (12, 13, 14, 15)
80- expected_gcc=(12 13 14 15)
81- for version in "${expected_gcc[@]}"; do
82- if command -v "gcc-$version" >/dev/null 2>&1 && command -v "g++-$version" >/dev/null 2>&1; then
83- gcc_ver=$(gcc-$version --version | head -1)
84- echo "✅ GCC-$version: $gcc_ver"
85- else
86- echo "❌ GCC-$version: NOT FOUND"
87- exit 1
88- fi
89- done
90-
91- # Expected Clang versions (16, 17, 18, 19, 20)
92- expected_clang=(16 17 18 19 20)
93- for version in "${expected_clang[@]}"; do
94- if command -v "clang-$version" >/dev/null 2>&1 && command -v "clang++-$version" >/dev/null 2>&1; then
95- clang_ver=$(clang-$version --version | head -1)
96- echo "✅ Clang-$version: $clang_ver"
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"
97149 else
98- echo "❌ Clang-$version: NOT FOUND "
150+ echo "❌ Quick build test failed "
99151 exit 1
100152 fi
101- done
102-
103- echo ""
104- echo "🔧 Default tool versions:"
105- gcc --version | head -1
106- clang --version | head -1
107- cmake --version | head -1
108- ninja --version
109- python3 --version
110- conan --version
111-
112- echo ""
113- echo "📦 Conan configuration validation:"
114- conan profile list
115-
116- # Verify expected Conan profiles exist
117- expected_profiles=(gcc12 gcc13 gcc14 clang16 clang17 clang18 clang20)
118- for profile in "${expected_profiles[@]}"; do
119- if conan profile show "$profile" >/dev/null 2>&1; then
120- echo "✅ Profile $profile: available"
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
121165 else
122- echo "❌ Profile $profile: MISSING "
166+ echo "❌ MkDocs: NOT FOUND "
123167 exit 1
124168 fi
125- done
126-
127- echo ""
128- echo "🏗️ Testing mp-units comprehensive setup with check_all.sh:"
129-
130- # Run the comprehensive installation and validation script
131- echo "Running check_all.sh install to validate all compiler configurations..."
132- if .devcontainer/check_all.sh install; then
133- echo "✅ check_all.sh install completed successfully"
134- echo "✅ All compiler profiles validated and dependencies installed"
135- else
136- echo "❌ check_all.sh install failed"
137- exit 1
138- fi
139-
140- echo ""
141- echo "🎯 Testing quick build validation:"
142- # Test one quick build to ensure the environment actually works
143- echo "Testing quick build with Clang-20..."
144- if conan create . -pr clang20 -c user.mp-units.build:all=False -s compiler.cppstd=23 -b missing; then
145- echo "✅ Quick build test passed"
146- else
147- echo "❌ Quick build test failed"
148- exit 1
149- fi
150-
151- echo ""
152- echo "📖 Testing documentation tools:"
153- if command -v mkdocs >/dev/null 2>&1; then
154- echo "✅ MkDocs: $(mkdocs --version)"
155- # Test mkdocs configuration
156- if mkdocs build --strict --quiet; then
157- echo "✅ Documentation builds successfully"
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
158181 else
159- echo "❌ Documentation build failed "
182+ echo "❌ API reference script missing "
160183 exit 1
161184 fi
162- else
163- echo "❌ MkDocs: NOT FOUND"
164- exit 1
165- fi
166-
167- echo ""
168- echo "🎯 Testing API reference setup:"
169- if [ -f ".devcontainer/api_reference.sh" ]; then
170- echo "✅ API reference script exists"
171- # Test setup-only mode
172- if .devcontainer/api_reference.sh -s; then
173- echo "✅ API reference setup completed"
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)"
174190 else
175- echo "❌ API reference setup failed "
191+ echo "❌ pre-commit: NOT FOUND "
176192 exit 1
177193 fi
178- else
179- echo "❌ API reference script missing"
180- exit 1
181- fi
182-
183- echo ""
184- echo "🧹 Testing code quality tools:"
185- if pre-commit --version >/dev/null 2>&1; then
186- echo "✅ pre-commit: $(pre-commit --version)"
187- else
188- echo "❌ pre-commit: NOT FOUND"
189- exit 1
190- fi
191-
192- echo ""
193- echo "🎉 All tests passed! Development environment is ready for mp-units development."
194+
195+ echo ""
196+ echo "🎉 All tests passed! Development environment is ready for mp-units development."
0 commit comments