17
17
- name : Install dependencies(mostly sd)
18
18
run : |
19
19
sudo apt update || true;sudo apt install -y mingw-w64 mingw-w64-x86-64-dev
20
- wget https://github.com/chmln/sd/releases/download/v1.0.0/sd-v1.0.0-x86_64-unknown-linux-gnu.tar.gz -O a.tar.gz
21
- tar -xzf a.tar.gz
22
- cp sd-v1.0.0-x86_64-unknown-linux-gnu/sd .
23
- chmod +x ./sd
24
20
25
21
- name : Setup rust version
26
22
run : |
33
29
sed -i 's/#lto = "thin"/lto = "thin"/g' Cargo.toml
34
30
cargo build --release --target x86_64-pc-windows-gnu --bin krokiet
35
31
mv target/x86_64-pc-windows-gnu/release/krokiet.exe windows_krokiet_on_linux.exe
36
- cargo build --release --target x86_64-pc-windows-gnu --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
37
- mv target/x86_64-pc-windows-gnu/release/krokiet.exe windows_krokiet_on_linux_skia_opengl.exe
38
- cargo build --release --target x86_64-pc-windows-gnu --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
39
- mv target/x86_64-pc-windows-gnu/release/krokiet.exe windows_krokiet_on_linux_skia_vulkan.exe
40
32
41
33
- name : Compile Krokiet Debug
42
34
if : ${{ github.ref != 'refs/heads/master' }}
@@ -45,19 +37,13 @@ jobs:
45
37
sed -i 's|^opt-level = 3 # OPT PACKAGES|#opt-level = 3 # OPT PACKAGES|' Cargo.toml
46
38
cargo build --target x86_64-pc-windows-gnu --bin krokiet
47
39
mv target/x86_64-pc-windows-gnu/debug/krokiet.exe windows_krokiet_on_linux.exe
48
- cargo build --target x86_64-pc-windows-gnu --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
49
- mv target/x86_64-pc-windows-gnu/debug/krokiet.exe windows_krokiet_on_linux_skia_opengl.exe
50
- cargo build--target x86_64-pc-windows-gnu --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
51
- mv target/x86_64-pc-windows-gnu/debug/krokiet.exe windows_krokiet_on_linux_skia_vulkan.exe
52
40
53
41
- name : Upload artifacts
54
42
uses : actions/upload-artifact@v4
55
43
with :
56
- name : krokiet-windows-c- on-linux-${{ github.sha }}
44
+ name : krokiet-windows-on-linux-${{ github.sha }}
57
45
path : |
58
46
./windows_krokiet_on_linux.exe
59
- ./windows_krokiet_on_linux_skia_opengl.exe
60
- ./windows_krokiet_on_linux_skia_vulkan.exe
61
47
if-no-files-found : error
62
48
63
49
- name : Release
69
55
windows_krokiet_on_linux.exe
70
56
token : ${{ secrets.PAT_REPOSITORY }}
71
57
58
+ krokiet-compiled-on-windows :
59
+ runs-on : windows-latest
60
+ steps :
61
+ - uses : actions/checkout@v4
62
+
63
+ - name : Setup rust version
64
+ run : |
65
+ rustup default 1.85.0
66
+ rustup target add x86_64-pc-windows-gnu
67
+
68
+ - name : Compile Krokiet Release
69
+ if : ${{ github.ref == 'refs/heads/master' }}
70
+ run : |
71
+ sed -i 's/#lto = "thin"/lto = "thin"/g' Cargo.toml
72
+ cargo build --release --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
73
+ mv target/release/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
74
+ cargo build --release --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
75
+ mv target/release/krokiet.exe windows_krokiet_on_windows_skia_vulkan.exe
76
+
77
+ - name : Compile Krokiet Debug
78
+ if : ${{ github.ref != 'refs/heads/master' }}
79
+ run : |
80
+ sed -i 's/^\(\[profile\.dev\.package.*\)/#\1/' Cargo.toml
81
+ sed -i 's|^opt-level = 3 # OPT PACKAGES|#opt-level = 3 # OPT PACKAGES|' Cargo.toml
82
+ cargo build --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
83
+ mv target/debug/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
84
+ cargo build --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
85
+ mv target/debug/krokiet.exe windows_krokiet_on_windows_skia_vulkan.exe
86
+
87
+ - name : Upload artifacts
88
+ uses : actions/upload-artifact@v4
89
+ with :
90
+ name : krokiet-windows-on-windows-${{ github.sha }}
91
+ path : |
92
+ ./windows_krokiet_on_windows_skia_opengl.exe
93
+ ./windows_krokiet_on_windows_skia_vulkan.exe
94
+ if-no-files-found : error
95
+
96
+ - name : Release
97
+ uses : softprops/action-gh-release@v2
98
+ if : ${{ github.ref == 'refs/heads/master' }}
99
+ with :
100
+ tag_name : " Nightly"
101
+ files : |
102
+ windows_krokiet_on_windows_skia_opengl.exe
103
+ windows_krokiet_on_windows_skia_vulkan.exe
104
+ token : ${{ secrets.PAT_REPOSITORY }}
105
+
72
106
container_4_12 :
73
107
runs-on : ubuntu-latest
74
108
container :
0 commit comments