diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 6a2885df1..6ee1bccab 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -26,18 +26,31 @@ jobs: CC=/mingw64/bin/cc CXX=/mingw64/bin/c++ cmake \ -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_PREFIX=$PWD/install \ -DENABLE_GTEST=ON \ -DBUILD_SHARED_LIBS=OFF cmake --build build + cmake --install build - name: Run test run: | cd build ctest + - name: list installed files + if: ${{ always() }} + run: | + echo "=== Contents of install/bin ===" + if [ -d install/bin ]; then ls -lh install/bin/; fi + echo -e "\n=== Contents of install/share/opencc ===" + if [ -d install/share/opencc ]; then ls -lh install/share/opencc/; fi + echo -e "\n=== All installed files ===" + if [ -d install ]; then find install -type f; fi - name: upload artifacts if: ${{ always() }} uses: actions/upload-artifact@v4 with: name: opencc-mingw path: | - build/** + install/** + build/src/tools/*.exe + build/Testing/** + build/ctest.log diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml index bbbed3a0d..cf05c45d6 100644 --- a/.github/workflows/msvc.yml +++ b/.github/workflows/msvc.yml @@ -28,15 +28,27 @@ jobs: run: ./build.cmd - name: test run: ./test.cmd + - name: list installed files + if: ${{ always() }} + shell: pwsh + run: | + Write-Host "=== Contents of build/bin directory ===" + if (Test-Path build/bin) { Get-ChildItem build/bin -Recurse | Select-Object FullName } + Write-Host "`n=== Contents of build/lib directory ===" + if (Test-Path build/lib) { Get-ChildItem build/lib -Recurse | Select-Object FullName } + Write-Host "`n=== Contents of build/share directory ===" + if (Test-Path build/share) { Get-ChildItem build/share -Recurse | Select-Object FullName } + Write-Host "`n=== Contents of build/include directory ===" + if (Test-Path build/include) { Get-ChildItem build/include -Recurse | Select-Object FullName } - name: upload artifacts if: ${{ always() }} uses: actions/upload-artifact@v4 with: name: opencc-msvc-${{ matrix.arch }} path: | - bin/** - lib/** - share/** - include/** + build/bin/** + build/lib/** + build/share/** + build/include/** build/ctest.log build/Testing/**