@@ -21,16 +21,22 @@ jobs:
2121 build_script : build_lib_for_x11.sh
2222 native_deps : build-essential libx11-dev libxtst-dev
2323 gradle_cmd : ./gradlew
24+ build_shell : bash
25+ gradle_shell : bash
2426 - os : macos-13
2527 platform : macos
2628 build_script : build_lib_for_mac.sh
2729 native_deps : ' '
2830 gradle_cmd : ./gradlew
31+ build_shell : bash
32+ gradle_shell : bash
2933 - os : windows-2022
3034 platform : windows
3135 build_script : build_lib_for_win.sh
3236 native_deps : ' '
3337 gradle_cmd : gradlew.bat
38+ build_shell : msys2 {0}
39+ gradle_shell : cmd
3440
3541 steps :
3642 - uses : actions/checkout@v4
5763 mingw-w64-x86_64-toolchain
5864 make
5965
60- - name : Build native library (Windows)
61- if : matrix.platform == 'windows'
62- shell : msys2 {0}
63- run : chmod +x ${{ matrix.build_script }} && ./${{ matrix.build_script }}
64-
65- - name : Build native library (Linux/macOS)
66- if : matrix.platform != 'windows'
66+ - name : Build native library
67+ shell : ${{ matrix.build_shell }}
6768 run : chmod +x ${{ matrix.build_script }} && ./${{ matrix.build_script }}
6869
6970 - name : Set executable permissions for gradlew (Linux/macOS)
@@ -72,28 +73,14 @@ jobs:
7273 chmod +x forge/gradlew
7374 chmod +x fabric/gradlew
7475
75- - name : Build Forge mod (Windows)
76- if : matrix.platform == 'windows'
77- shell : cmd
78- run : |
79- cd forge
80- ${{ matrix.gradle_cmd }} build --no-daemon
81-
82- - name : Build Forge mod (Linux/macOS)
83- if : matrix.platform != 'windows'
76+ - name : Build Forge mod
77+ shell : ${{ matrix.gradle_shell }}
8478 run : |
8579 cd forge
8680 ${{ matrix.gradle_cmd }} build --no-daemon
8781
88- - name : Build Fabric mod (Windows)
89- if : matrix.platform == 'windows'
90- shell : cmd
91- run : |
92- cd fabric
93- ${{ matrix.gradle_cmd }} build --no-daemon
94-
95- - name : Build Fabric mod (Linux/macOS)
96- if : matrix.platform != 'windows'
82+ - name : Build Fabric mod
83+ shell : ${{ matrix.gradle_shell }}
9784 run : |
9885 cd fabric
9986 ${{ matrix.gradle_cmd }} build --no-daemon
0 commit comments