Skip to content

Commit

Permalink
Build towbootctl for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
YtvwlD committed Apr 26, 2024
1 parent 72a9519 commit 4a48574
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ jobs:
with:
name: towbootctl-debug-x86_64-linux
path: target/x86_64-unknown-linux-gnu/debug/towbootctl
- name: Install compiler for x86_64-windows
run: sudo apt-get update && sudo apt-get install gcc-mingw-w64-x86-64-win32
- name: Install Rust for x86_64-windows
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: x86_64-pc-windows-gnu
- name: Build towbootctl for x86_64-windows
uses: actions-rs/cargo@v1
with:
command: build
args: --package towbootctl --target x86_64-pc-windows-gnu --features=binary
- name: Upload x86_64-linux artifact
uses: actions/upload-artifact@v3
with:
name: towbootctl-debug-x86_64-windows
path: target/x86_64-pc-windows-gnu/debug/towbootctl
- name: Install qemu
run: sudo apt-get update && sudo apt-get install -y qemu-system-x86
- name: Enable KVM group perms
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ jobs:
toolchain: nightly
override: true
target: x86_64-unknown-uefi
- name: Install compiler for x86_64-windows
run: sudo apt-get update && sudo apt-get install gcc-mingw-w64-x86-64-win32
- name: Install Rust for x86_64-windows
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: x86_64-pc-windows-gnu
- name: Build for i686
uses: actions-rs/cargo@v1
with:
Expand All @@ -29,17 +36,24 @@ jobs:
with:
command: build
args: --package towboot --target x86_64-unknown-uefi --release
- name: Build towbootctl for x86_64-unknown-linux
- name: Build towbootctl for x86_64-linux
uses: actions-rs/cargo@v1
with:
command: build
args: --package towbootctl --target x86_64-unknown-linux-gnu --features=binary --release
- name: Build towbootctl for x86_64-windows
uses: actions-rs/cargo@v1
with:
command: build
args: --package towbootctl --target x86_64-pc-windows-gnu --features=binary --release
- name: Rename files (1)
run: cp target/i686-unknown-uefi/release/towboot.efi towboot-$(git describe --always --tags)-i686.efi
- name: Rename files (2)
run: cp target/x86_64-unknown-uefi/release/towboot.efi towboot-$(git describe --always --tags)-x86_64.efi
- name: Rename files (2)
run: cp target/x86_64-unknown-linux-gnu/release/towbootctl towbootctl-$(git describe --always --tags)-x86_64-linux
- name: Rename files (3)
run: cp target/x86_64-pc-windows-gnu/release/towbootctl towbootctl-$(git describe --always --tags)-x86_64-windows
- name: Install qemu
run: sudo apt-get update && sudo apt-get install -y qemu-system-x86
- name: Enable KVM group perms
Expand Down

0 comments on commit 4a48574

Please sign in to comment.