From a22ec3df6817fd8d9f564d9eccb15266816e8526 Mon Sep 17 00:00:00 2001 From: zhaodengke Date: Wed, 6 Nov 2024 17:46:34 +0800 Subject: [PATCH] Update test.yml --- .github/workflows/test.yml | 41 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 47183ae08..8e8ff0999 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,8 +37,6 @@ jobs: exclude: - os: ubuntu-latest bits: 32 - - os: windows-latest - bits: 64 - os: windows-latest bits: 32 @@ -60,6 +58,7 @@ jobs: run: | echo ${{ github.workspace }} ${{ matrix.os }}-${{ matrix.bits }} if [ "x${{ matrix.bits }}" = "x32" ]; then echo "arch=86" >> "$GITHUB_OUTPUT"; else echo "arch=64" >> "$GITHUB_OUTPUT"; fi + if [ "x${{ matrix.os }}" = "xubuntu" ]; then echo "os=linux" >> "$GITHUB_OUTPUT"; else echo "os=win" >> "$GITHUB_OUTPUT"; fi - name: Get current date time id: current_datetime @@ -86,27 +85,27 @@ jobs: if: matrix.os == 'windows-latest' run: | cd Q3E\src\main\jni\doom3\neo - cmake -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -B win_x${{ steps.strings.outputs.arch }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_D3_MOD=OFF -DBUILD_Q4=OFF -DBUILD_PREY=OFF -DBUILD_Q4_MOD=OFF -A ${{ matrix.bits == 32 && 'Win32' || 'x64' }} CMakeLists.txt + cmake -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -B ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_D3_MOD=OFF -DBUILD_Q4=OFF -DBUILD_PREY=OFF -DBUILD_Q4_MOD=OFF -A ${{ matrix.bits == 32 && 'Win32' || 'x64' }} CMakeLists.txt - name: Build with Ninja if: matrix.os == 'windows-latest' run: | cd Q3E\src\main\jni\doom3\neo - dir win_x${{ steps.strings.outputs.arch }} - cmake --build win_x${{ steps.strings.outputs.arch }} --config Release + dir ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }} + cmake --build ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }} --config Release - name: Copy OpenAL32.dll if: matrix.os == 'windows-latest' run: | - xcopy /Y/Q ${{ github.workspace }}\vcpkg\packages\openal-soft_x${{ steps.strings.outputs.arch }}-windows\bin\OpenAL32.dll Q3E\src\main\jni\doom3\neo\win_x${{ steps.strings.outputs.arch }}\Release\ + xcopy /Y/Q ${{ github.workspace }}\vcpkg\packages\openal-soft_x${{ steps.strings.outputs.arch }}-windows\bin\OpenAL32.dll Q3E\src\main\jni\doom3\neo\${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}\Release\ - name: Prepare package if: matrix.os == 'windows-latest' run: | - dir Q3E\src\main\jni\doom3\neo\win_x${{ steps.strings.outputs.arch }}\Release + dir Q3E\src\main\jni\doom3\neo\${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}\Release mkdir Release - xcopy /Y/Q Q3E\src\main\jni\doom3\neo\win_x${{ steps.strings.outputs.arch }}\Release\*.dll windows_x${{ steps.strings.outputs.arch }}_release\ - xcopy /Y/Q Q3E\src\main\jni\doom3\neo\win_x${{ steps.strings.outputs.arch }}\Release\*.exe windows_x${{ steps.strings.outputs.arch }}_release\ + xcopy /Y/Q Q3E\src\main\jni\doom3\neo\${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}\Release\*.dll windows_x${{ steps.strings.outputs.arch }}_release\ + xcopy /Y/Q Q3E\src\main\jni\doom3\neo\${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}\Release\*.exe windows_x${{ steps.strings.outputs.arch }}_release\ dir windows_x${{ steps.strings.outputs.arch }}_release - name: Package @@ -127,32 +126,32 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | cd Q3E/src/main/jni/doom3/neo - cmake -B linux_x${{ steps.strings.outputs.arch }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_SHARED_LINKER_FLAGS=-m${{ matrix.bits }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_D3_MOD=OFF -DBUILD_Q4=OFF -DBUILD_PREY=OFF -DBUILD_Q4_MOD=OFF CMakeLists.txt + cmake -B ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_SHARED_LINKER_FLAGS=-m${{ matrix.bits }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_D3_MOD=OFF -DBUILD_Q4=OFF -DBUILD_PREY=OFF -DBUILD_Q4_MOD=OFF CMakeLists.txt - name: Build with make if: matrix.os == 'ubuntu-latest' run: | cd Q3E/src/main/jni/doom3/neo - dir linux_x${{ steps.strings.outputs.arch }} - cmake --build linux_x${{ steps.strings.outputs.arch }} --config Release + ls ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }} + cmake --build ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }} --config Release - name: Prepare package if: matrix.os == 'ubuntu-latest' run: | - ls --color Q3E/src/main/jni/doom3/neo/linux_x${{ steps.strings.outputs.arch }}/Release - mkdir linux_x${{ steps.strings.outputs.arch }}_release - cp Q3E/src/main/jni/doom3/neo/linux_x${{ steps.strings.outputs.arch }}/*.so linux_x${{ steps.strings.outputs.arch }}_release/ - cp Q3E/src/main/jni/doom3/neo/linux_x${{ steps.strings.outputs.arch }}/Release/Doom3 linux_x${{ steps.strings.outputs.arch }}_release/ - cp Q3E/src/main/jni/doom3/neo/linux_x${{ steps.strings.outputs.arch }}/Release/Quake4 linux_x${{ steps.strings.outputs.arch }}_release/ - cp Q3E/src/main/jni/doom3/neo/linux_x${{ steps.strings.outputs.arch }}/Release/Prey linux_x${{ steps.strings.outputs.arch }}_release/ - dir linux_x${{ steps.strings.outputs.arch }}_release - tar zcvf idTech4A++-test_linux_x${{ steps.strings.outputs.arch }}_release-${{ steps.current_datetime.outputs.time }}.tar.gz linux_x${{ steps.strings.outputs.arch }}_release/ + ls --color Q3E/src/main/jni/doom3/neo/${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }} + mkdir ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}_release + cp Q3E/src/main/jni/doom3/neo/${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}/*.so ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}_release/ + cp Q3E/src/main/jni/doom3/neo/${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}/Release/Doom3 ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}_release/ + cp Q3E/src/main/jni/doom3/neo/${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}/Release/Quake4 ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}_release/ + cp Q3E/src/main/jni/doom3/neo/${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}/Release/Prey ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}_release/ + dir ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}_release + tar zcvf idTech4A++-test_${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}_release-${{ steps.current_datetime.outputs.time }}.tar.gz ${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}_release/ - uses: actions/upload-artifact@v4 name: Upload Zip artifacts with: name: "${{ matrix.os }}-${{ matrix.bits }}-release" - path: "idTech4A++-test_windows_x${{ steps.strings.outputs.arch }}_release-${{ steps.current_datetime.outputs.time }}.zip" + path: "idTech4A++-test_${{ steps.strings.outputs.os }}_x${{ steps.strings.outputs.arch }}_release-${{ steps.current_datetime.outputs.time }}.${{matrix.os == ubuntu && 'tar.gz' || 'zip'}}" retention-days: 1 collect: