Skip to content

Commit

Permalink
ci: simplify workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Feb 2, 2025
1 parent 0962c69 commit ce1775a
Showing 1 changed file with 5 additions and 30 deletions.
35 changes: 5 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,8 @@ jobs:
- name: Build RMG (AppImage)
run: |
export src_dir="$(pwd)"
export threads=$(($(nproc) / 2))
if [ "$threads" = "0" ]
then
threads=1
fi
if [ "${{ matrix.cmake_args }}" == "-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON" ]
then
export build_dir="$(pwd)/Build/AppImage"
export bin_dir="$(pwd)/Bin/AppImage"
else
export build_dir="$(pwd)/Build/CI"
export bin_dir="$(pwd)/Bin/CI"
fi
export build_dir="$(pwd)/Build/AppImage"
export bin_dir="$(pwd)/Bin/AppImage"
mkdir $build_dir Bin/ -p
cmake -S "$src_dir" -B "$build_dir" -DCMAKE_BUILD_TYPE="Release" \
Expand All @@ -52,7 +39,7 @@ jobs:
-DPORTABLE_INSTALL="OFF" \
-DUPDATER=ON -DAPPIMAGE_UPDATER=ON \
-G "Unix Makefiles"
cmake --build "$build_dir" --parallel "$threads"
cmake --build "$build_dir" --parallel "$(nproc)"
cmake --install "$build_dir" --strip --prefix="$bin_dir/usr"
shell: bash
- name: Create AppImage
Expand Down Expand Up @@ -109,25 +96,13 @@ jobs:
- name: Build RMG (Portable)
run: |
export src_dir="$(pwd)"
export threads=$(($(nproc) / 2))
if [ "$threads" = "0" ]
then
threads=1
fi
if [ "${{ matrix.cmake_args }}" == "-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON" ]
then
export build_dir="$(pwd)/Build/Release"
else
export build_dir="$(pwd)/Build/CI"
fi
export build_dir="$(pwd)/Build/Release"
cmake -S "$src_dir" -B "$build_dir" -DCMAKE_BUILD_TYPE="Release" \
${{ matrix.cmake_args }} \
-DPORTABLE_INSTALL=ON -DUPDATER=ON -G "MSYS Makefiles"
cmake --build "$build_dir" --parallel "$threads"
cmake --build "$build_dir" --parallel "$(nproc)"
if [ "${{ matrix.cmake_args }}" == "-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON" ]
then
Expand Down

0 comments on commit ce1775a

Please sign in to comment.