Bump version to 0.8.0 #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
tags: 'v*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust for i686 | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
target: i686-unknown-uefi | |
- name: Install Rust for x86_64 | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
target: x86_64-unknown-uefi | |
- name: Build for i686 | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --package towboot --target i686-unknown-uefi --release | |
- name: Build for x86_64 | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --package towboot --target x86_64-unknown-uefi --release | |
- name: Build towbootctl for x86_64-unknown-linux | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --package towbootctl --target x86_64-unknown-linux-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: Install qemu | |
run: sudo apt-get update && sudo apt-get install -y qemu-system-x86 | |
- name: Enable KVM group perms | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
# https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/ | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --package tests --release | |
- name: Publish release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
towboot-*-i686.efi | |
towboot-*-x86_64.efi | |
towbootctl-*-x86_64-linux | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |