2020
2121 - name : Setup rust version
2222 run : |
23- rustup default 1.85 .0
23+ rustup default 1.86 .0
2424 rustup target add x86_64-pc-windows-gnu
2525
2626 - name : Compile Krokiet Release
@@ -62,55 +62,56 @@ jobs:
6262 token : ${{ secrets.PAT_REPOSITORY }}
6363
6464 # 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.85.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 }}
114115
115116 container_4_12 :
116117 runs-on : ubuntu-latest
@@ -124,7 +125,7 @@ jobs:
124125 dnf install curl wget2 unzip mingw64-bzip2.noarch mingw64-poppler mingw64-poppler-glib mingw32-python3 rust-gio-devel adwaita-icon-theme -y && dnf clean all -y
125126 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
126127 source "$HOME/.cargo/env"
127- rustup default 1.85 .0
128+ rustup default 1.86 .0
128129 rustup target add x86_64-pc-windows-gnu
129130
130131 - name : Cross compile for Windows - Release
@@ -210,7 +211,7 @@ jobs:
210211 dnf install curl wget2 unzip mingw64-bzip2.noarch mingw64-poppler mingw64-poppler-glib mingw32-python3 rust-gio-devel adwaita-icon-theme -y && dnf clean all -y
211212 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
212213 source "$HOME/.cargo/env"
213- rustup default 1.85 .0
214+ rustup default 1.86 .0
214215 rustup target add x86_64-pc-windows-gnu
215216
216217 - name : Cross compile for Windows - Release
0 commit comments