Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
glKarin committed Nov 6, 2024
1 parent 330503f commit a22ec3d
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ jobs:
exclude:
- os: ubuntu-latest
bits: 32
- os: windows-latest
bits: 64
- os: windows-latest
bits: 32

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit a22ec3d

Please sign in to comment.