|
8 | 8 | workflow_dispatch:
|
9 | 9 |
|
10 | 10 | jobs:
|
11 |
| - build_core_debug: |
| 11 | + build_melonloader: |
12 | 12 | runs-on: windows-latest
|
13 | 13 | steps:
|
14 | 14 | - uses: actions/checkout@v3
|
15 |
| - - name: setup-msbuild |
| 15 | + - name: Setup MsBuild |
16 | 16 | uses: microsoft/setup-msbuild@v1
|
17 |
| - - name: Build Melonloader Core |
18 |
| - shell: cmd |
19 |
| - run: msbuild /restore /p:Platform="Windows - x64" # Platform is actually irrelevant for core, it's compiled as AnyCPU either way |
20 |
| - - name: Upload core artifact |
21 |
| - uses: actions/upload-artifact@v3 |
22 |
| - with: |
23 |
| - name: MLCoreDebug |
24 |
| - path: Output/Debug/MelonLoader/ |
25 |
| - build_core_release: |
26 |
| - runs-on: windows-latest |
27 |
| - steps: |
28 |
| - - uses: actions/checkout@v3 |
29 |
| - - name: setup-msbuild |
30 |
| - uses: microsoft/setup-msbuild@v1 |
31 |
| - - name: Build Melonloader Core |
| 17 | + - name: Build Melonloader (Release) |
32 | 18 | shell: cmd
|
33 | 19 | run: msbuild /restore /p:Configuration=Release /p:Platform="Windows - x64"
|
34 |
| - - name: Upload core artifact |
| 20 | + - name: Build MelonLoader (Debug) |
| 21 | + shell: cmd |
| 22 | + run: msbuild /restore /p:Platform="Windows - x64" |
| 23 | + - name: Upload Release Artifact |
35 | 24 | uses: actions/upload-artifact@v3
|
36 | 25 | with:
|
37 | 26 | name: MLCoreRelease
|
38 | 27 | path: Output/Release/MelonLoader/
|
39 |
| - build_rust_windows: |
40 |
| - runs-on: windows-latest |
| 28 | + - name: Upload Debug Artifact |
| 29 | + uses: actions/upload-artifact@v3 |
| 30 | + with: |
| 31 | + name: MLCoreDebug |
| 32 | + path: Output/Debug/MelonLoader/ |
| 33 | + build_rust: |
| 34 | + runs-on: ubuntu-latest |
41 | 35 | steps:
|
42 | 36 | - uses: actions/checkout@v3
|
43 |
| - - name: rust-toolchain |
44 |
| - uses: dtolnay/rust-toolchain@stable |
45 |
| - with: |
46 |
| - toolchain: nightly |
47 |
| - # Target triple to install for this toolchain |
48 |
| - targets: i686-pc-windows-msvc, x86_64-pc-windows-msvc |
49 |
| - # Build Rust Release |
50 |
| - - name: Build Rust Release | Windows - x86 |
51 |
| - shell: cmd |
52 |
| - run: cargo +nightly build --target i686-pc-windows-msvc --release |
| 37 | + - name: Install Rust (nightly) |
| 38 | + run: |
| 39 | + curl https://sh.rustup.rs -sSf | sh -s -- -y |
| 40 | + - name: Make Rust Nightly |
| 41 | + shell: bash |
| 42 | + run: rustup default nightly |
| 43 | + - name: Install Linux target x64 |
| 44 | + shell: bash |
| 45 | + run: rustup target add x86_64-unknown-linux-gnu |
| 46 | + - name: Install Windows target x64 |
| 47 | + shell: bash |
| 48 | + run: rustup target add x86_64-pc-windows-msvc |
| 49 | + - name: Install Windows target x86 |
| 50 | + shell: bash |
| 51 | + run: rustup target add i686-pc-windows-msvc |
| 52 | + - name: Install x-win |
| 53 | + shell: bash |
| 54 | + run: cargo install cargo-xwin |
| 55 | + - name: install dev dependencies |
| 56 | + shell: bash |
| 57 | + run: sudo apt-get install libgtk-3-dev wine llvm |
| 58 | + - name: Build Rust Release | Linux - x64 |
| 59 | + shell: bash |
| 60 | + run: cargo build --target x86_64-unknown-linux-gnu --release |
| 61 | + - name: Build Rust Debug | Linux - x64 |
| 62 | + shell: bash |
| 63 | + run: cargo build --target x86_64-unknown-linux-gnu |
53 | 64 | - name: Build Rust Release | Windows - x64
|
54 |
| - shell: cmd |
55 |
| - run: cargo +nightly build --target x86_64-pc-windows-msvc --release |
56 |
| - # Build Rust Debug |
57 |
| - - name: Build Rust Debug | Windows - x86 |
58 |
| - shell: cmd |
59 |
| - run: cargo +nightly build --target i686-pc-windows-msvc |
| 65 | + shell: bash |
| 66 | + run: cargo xwin build --target x86_64-pc-windows-msvc --release |
60 | 67 | - name: Build Rust Debug | Windows - x64
|
61 |
| - shell: cmd |
62 |
| - run: cargo +nightly build --target x86_64-pc-windows-msvc |
63 |
| - # Upload Proxy Release - x86 |
| 68 | + shell: bash |
| 69 | + run: cargo xwin build --target x86_64-pc-windows-msvc |
| 70 | + - name: Build Rust Release | Windows - x86 |
| 71 | + shell: bash |
| 72 | + run: XWIN_ARCH=x86 cargo xwin build --target i686-pc-windows-msvc --release |
| 73 | + - name: Build Rust Debug | Windows - x86 |
| 74 | + shell: bash |
| 75 | + run: XWIN_ARCH=x86 cargo xwin build --target i686-pc-windows-msvc |
| 76 | + - name: Upload Proxy Release | Linux x64 |
| 77 | + uses: actions/upload-artifact@v3 |
| 78 | + with: |
| 79 | + name: MLProxyX64-Linux-Release |
| 80 | + path: target/x86_64-unknown-linux-gnu/release/libversion.so |
| 81 | + - name: Upload Bootstrap Release | Linux x64 |
| 82 | + uses: actions/upload-artifact@v3 |
| 83 | + with: |
| 84 | + name: MLBootstrapX64-Linux-Release |
| 85 | + path: target/x86_64-unknown-linux-gnu/release/libBootstrap.so |
| 86 | + - name: Upload Proxy Debug | Linux x64 |
| 87 | + uses: actions/upload-artifact@v3 |
| 88 | + with: |
| 89 | + name: MLProxyX64-Linux-Debug |
| 90 | + path: target/x86_64-unknown-linux-gnu/debug/libversion.so |
| 91 | + - name: Upload Bootstrap Debug | Linux x64 |
| 92 | + uses: actions/upload-artifact@v3 |
| 93 | + with: |
| 94 | + name: MLBootstrapX64-Linux-Debug |
| 95 | + path: target/x86_64-unknown-linux-gnu/debug/libBootstrap.so |
64 | 96 | - name: Upload Proxy Release | Windows x86
|
65 | 97 | uses: actions/upload-artifact@v3
|
66 | 98 | with:
|
67 | 99 | name: MLProxyX86-Windows-Release
|
68 | 100 | path: target/i686-pc-windows-msvc/release/version.dll
|
69 |
| - # Upload Bootstrap Release - x86 |
70 | 101 | - name: Upload Bootstrap Release | Windows x86
|
71 | 102 | uses: actions/upload-artifact@v3
|
72 | 103 | with:
|
73 | 104 | name: MLBootstrapX86-Windows-Release
|
74 | 105 | path: target/i686-pc-windows-msvc/release/Bootstrap.dll
|
75 |
| - # Upload Proxy Release - x64 |
76 | 106 | - name: Upload Proxy Release | Windows x64
|
77 | 107 | uses: actions/upload-artifact@v3
|
78 | 108 | with:
|
79 | 109 | name: MLProxyX64-Windows-Release
|
80 | 110 | path: target/x86_64-pc-windows-msvc/release/version.dll
|
81 |
| - # Upload Bootstrap Release - x64 |
82 | 111 | - name: Upload Bootstrap Release | Windows x64
|
83 | 112 | uses: actions/upload-artifact@v3
|
84 | 113 | with:
|
85 | 114 | name: MLBootstrapX64-Windows-Release
|
86 | 115 | path: target/x86_64-pc-windows-msvc/release/Bootstrap.dll
|
87 |
| - # Upload Proxy Debug - x86 |
88 | 116 | - name: Upload Proxy Debug | Windows x86
|
89 | 117 | uses: actions/upload-artifact@v3
|
90 | 118 | with:
|
91 | 119 | name: MLProxyX86-Windows-Debug
|
92 | 120 | path: target/i686-pc-windows-msvc/debug/version.dll
|
93 |
| - # Upload Bootstrap Debug - x86 |
94 | 121 | - name: Upload Bootstrap Debug | Windows x86
|
95 | 122 | uses: actions/upload-artifact@v3
|
96 | 123 | with:
|
97 | 124 | name: MLBootstrapX86-Windows-Debug
|
98 | 125 | path: target/i686-pc-windows-msvc/debug/Bootstrap.dll
|
99 |
| - # Upload Proxy Debug - x64 |
100 | 126 | - name: Upload Proxy Debug | Windows x64
|
101 | 127 | uses: actions/upload-artifact@v3
|
102 | 128 | with:
|
103 | 129 | name: MLProxyX64-Windows-Debug
|
104 | 130 | path: target/x86_64-pc-windows-msvc/debug/version.dll
|
105 |
| - # Upload Bootstrap Debug - x64 |
106 | 131 | - name: Upload Bootstrap Debug | Windows x64
|
107 | 132 | uses: actions/upload-artifact@v3
|
108 | 133 | with:
|
109 | 134 | name: MLBootstrapX64-Windows-Debug
|
110 | 135 | path: target/x86_64-pc-windows-msvc/debug/Bootstrap.dll
|
111 |
| - build_rust_linux: |
112 |
| - runs-on: ubuntu-latest |
113 |
| - steps: |
114 |
| - - uses: actions/checkout@v3 |
115 |
| - - name: rust-toolchain |
116 |
| - uses: dtolnay/rust-toolchain@stable |
117 |
| - with: |
118 |
| - toolchain: nightly |
119 |
| - # Target triple to install for this toolchain |
120 |
| - targets: x86_64-unknown-linux-gnu |
121 |
| - - name: install dev dependencies |
122 |
| - shell: bash |
123 |
| - run: sudo apt-get install libgtk-3-dev |
124 |
| - - name: Build Rust Release | Linux - x64 |
125 |
| - shell: bash |
126 |
| - run: cargo +nightly build --target x86_64-unknown-linux-gnu --release |
127 |
| - - name: Build Rust Debug | Linux - x64 |
128 |
| - shell: bash |
129 |
| - run: cargo +nightly build --target x86_64-unknown-linux-gnu |
130 |
| - - name: Upload Proxy Release | Linux x64 |
131 |
| - uses: actions/upload-artifact@v3 |
132 |
| - with: |
133 |
| - name: MLProxyX64-Linux-Release |
134 |
| - path: target/x86_64-unknown-linux-gnu/release/libversion.so |
135 |
| - - name: Upload Bootstrap Release | Linux x64 |
136 |
| - uses: actions/upload-artifact@v3 |
137 |
| - with: |
138 |
| - name: MLBootstrapX64-Linux-Release |
139 |
| - path: target/x86_64-unknown-linux-gnu/release/libBootstrap.so |
140 |
| - - name: Upload Proxy Debug | Linux x64 |
141 |
| - uses: actions/upload-artifact@v3 |
142 |
| - with: |
143 |
| - name: MLProxyX64-Linux-Debug |
144 |
| - path: target/x86_64-unknown-linux-gnu/debug/libversion.so |
145 |
| - - name: Upload Bootstrap Debug | Linux x64 |
146 |
| - uses: actions/upload-artifact@v3 |
147 |
| - with: |
148 |
| - name: MLBootstrapX64-Linux-Debug |
149 |
| - path: target/x86_64-unknown-linux-gnu/debug/libBootstrap.so |
150 | 136 | finalize_x64_debug_zip_windows:
|
151 | 137 | runs-on: windows-latest
|
152 |
| - needs: [build_core_debug, build_rust_windows] |
| 138 | + needs: [build_rust, build_melonloader] |
153 | 139 | steps:
|
154 | 140 | - uses: actions/checkout@v3
|
155 | 141 | - name: Download core artifact
|
@@ -191,7 +177,7 @@ jobs:
|
191 | 177 | path: ./Output/Debug/x64/*
|
192 | 178 | finalize_x86_debug_zip_windows:
|
193 | 179 | runs-on: windows-latest
|
194 |
| - needs: [build_core_debug, build_rust_windows] |
| 180 | + needs: [build_rust, build_melonloader] |
195 | 181 | steps:
|
196 | 182 | - uses: actions/checkout@v3
|
197 | 183 | - name: Download core artifact
|
@@ -233,7 +219,7 @@ jobs:
|
233 | 219 | path: ./Output/Debug/x86/*
|
234 | 220 | finalize_x64_release_zip_windows:
|
235 | 221 | runs-on: windows-latest
|
236 |
| - needs: [build_core_release, build_rust_windows] |
| 222 | + needs: [build_rust, build_melonloader] |
237 | 223 | steps:
|
238 | 224 | - uses: actions/checkout@v3
|
239 | 225 | - name: Download core artifact
|
@@ -275,7 +261,7 @@ jobs:
|
275 | 261 | path: ./Output/Release/x64/*
|
276 | 262 | finalize_x86_release_zip_windows:
|
277 | 263 | runs-on: windows-latest
|
278 |
| - needs: [build_core_release, build_rust_windows] |
| 264 | + needs: [build_rust, build_melonloader] |
279 | 265 | steps:
|
280 | 266 | - uses: actions/checkout@v3
|
281 | 267 | - name: Download core artifact
|
@@ -317,7 +303,7 @@ jobs:
|
317 | 303 | path: ./Output/Release/x86/*
|
318 | 304 | finalize_x64_debug_zip_linux:
|
319 | 305 | runs-on: windows-latest
|
320 |
| - needs: [build_core_debug, build_rust_linux] |
| 306 | + needs: [build_rust, build_melonloader] |
321 | 307 | steps:
|
322 | 308 | - uses: actions/checkout@v3
|
323 | 309 | - name: Download core artifact
|
@@ -356,7 +342,7 @@ jobs:
|
356 | 342 | path: ./Output/Debug/x64/*
|
357 | 343 | finalize_x64_release_zip_linux:
|
358 | 344 | runs-on: windows-latest
|
359 |
| - needs: [build_core_release, build_rust_linux] |
| 345 | + needs: [build_rust, build_melonloader] |
360 | 346 | steps:
|
361 | 347 | - uses: actions/checkout@v3
|
362 | 348 | - name: Download core artifact
|
|
0 commit comments