@@ -62,55 +62,56 @@ jobs:
62
62
token : ${{ secrets.PAT_REPOSITORY }}
63
63
64
64
# Skia not provides support for gnu toolchain, which is easy to cross-compile - https://github.com/rust-skia/rust-skia/issues/345
65
- # So need to compile krokiet on Windows
66
- # TODO - not sure how to replace sed on Windows, this is the only thing that prevents this workflow from working
67
- # krokiet-compiled-on-windows:
68
- # runs-on: windows-latest
69
- # steps:
70
- # - uses: actions/checkout@v4
71
- #
72
- # - name: Setup rust version
73
- # run: |
74
- # rustup default 1.86.0
75
- #
76
- # - name: Compile Krokiet Release
77
- # if: ${{ github.ref == 'refs/heads/master' }}
78
- # run: |
79
- # sed -i 's/#lto = /lto = /g' Cargo.toml
80
- # sed -i 's/#codegen-units /codegen-units /g' Cargo.toml
81
- # cargo build --release --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
82
- # mv target/release/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
83
- # cargo build --release --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
84
- # mv target/release/krokiet.exe windows_krokiet_on_windows_skia_vulkan.exe
85
- #
86
- # - name: Compile Krokiet Debug
87
- # if: ${{ github.ref != 'refs/heads/master' }}
88
- # run: |
89
- # sed -i 's/^\(\[profile\.dev\.package.*\)/#\1/' Cargo.toml
90
- # sed -i 's|^opt-level = 3 # OPT PACKAGES|#opt-level = 3 # OPT PACKAGES|' Cargo.toml
91
- # cargo build --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
92
- # mv target/debug/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
93
- # cargo build --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
94
- # mv target/debug/krokiet.exe windows_krokiet_on_windows_skia_vulkan.exe
95
- #
96
- # - name: Upload artifacts
97
- # uses: actions/upload-artifact@v4
98
- # with:
99
- # name: krokiet-windows-on-windows-${{ github.sha }}
100
- # path: |
101
- # windows_krokiet_on_windows_skia_opengl.exe
102
- # windows_krokiet_on_windows_skia_vulkan.exe
103
- # if-no-files-found: error
104
- #
105
- # - name: Release
106
- # uses: softprops/action-gh-release@v2
107
- # if: ${{ github.ref == 'refs/heads/master' }}
108
- # with:
109
- # tag_name: "Nightly"
110
- # files: |
111
- # windows_krokiet_on_windows_skia_opengl.exe
112
- # windows_krokiet_on_windows_skia_vulkan.exe
113
- # token: ${{ secrets.PAT_REPOSITORY }}
65
+ # So need to compile krokiet on msvc Windows
66
+ krokiet-compiled-on-windows :
67
+ runs-on : windows-latest
68
+ steps :
69
+ - uses : actions/checkout@v4
70
+
71
+ - name : Setup rust version
72
+ run : |
73
+ rustup default 1.86.0
74
+
75
+ - name : Compile Krokiet Release
76
+ if : ${{ github.ref == 'refs/heads/master' }}
77
+ run : |
78
+ # Replace '#lto = ' with 'lto = ' in Cargo.toml
79
+ powershell -Command "(Get-Content Cargo.toml) -replace '#lto = ', 'lto = ' | Set-Content Cargo.toml"
80
+ # Replace '#codegen-units ' with 'codegen-units ' in Cargo.toml
81
+ powershell -Command "(Get-Content Cargo.toml) -replace '#codegen-units ', 'codegen-units ' | Set-Content Cargo.toml"
82
+ cargo build --release --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
83
+ mv target/release/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
84
+ cargo build --release --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
85
+ mv target/release/krokiet.exe windows_krokiet_on_windows_skia_vulkan.exe
86
+
87
+ - name : Compile Krokiet Debug
88
+ if : ${{ github.ref != 'refs/heads/master' }}
89
+ run : |
90
+ # Comment out '[profile.dev.package.*' lines
91
+ powershell -Command "(Get-Content Cargo.toml) -replace '^\[profile\.dev\.package.*', { '#' + \$_ } | Set-Content Cargo.toml"
92
+ # Comment out 'opt-level = 3 # OPT PACKAGES'
93
+ powershell -Command "(Get-Content Cargo.toml) -replace '^opt-level = 3 # OPT PACKAGES', '#opt-level = 3 # OPT PACKAGES' | Set-Content Cargo.toml"
94
+ cargo build --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
95
+ mv target/debug/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
96
+
97
+ - name : Upload artifacts
98
+ uses : actions/upload-artifact@v4
99
+ with :
100
+ name : krokiet-windows-on-windows-${{ github.sha }}
101
+ path : |
102
+ windows_krokiet_on_windows_skia_opengl.exe
103
+ windows_krokiet_on_windows_skia_vulkan.exe
104
+ if-no-files-found : error
105
+
106
+ - name : Release
107
+ uses : softprops/action-gh-release@v2
108
+ if : ${{ github.ref == 'refs/heads/master' }}
109
+ with :
110
+ tag_name : " Nightly"
111
+ files : |
112
+ windows_krokiet_on_windows_skia_opengl.exe
113
+ windows_krokiet_on_windows_skia_vulkan.exe
114
+ token : ${{ secrets.PAT_REPOSITORY }}
114
115
115
116
container_4_12 :
116
117
runs-on : ubuntu-latest
0 commit comments