Skip to content

Commit

Permalink
ci: download loader using GitHub CLI
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Jan 26, 2024
1 parent 176fbd2 commit 6c45e85
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
merge_group:

env:
GH_TOKEN: ${{ github.token }}
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings

Expand Down Expand Up @@ -109,10 +110,7 @@ jobs:
env:
RUSTFLAGS: -Awarnings
- name: Download loader
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: hermit-os/loader
file: hermit-loader-x86_64
run: gh release download --repo hermit-os/loader --pattern hermit-loader-x86_64
- run: rustup target add x86_64-unknown-none
- name: Integration tests
run: cargo test --tests --no-fail-fast --target x86_64-unknown-none -- --bootloader_path=hermit-loader-x86_64
Expand Down Expand Up @@ -217,10 +215,7 @@ jobs:
kernel
kernel/hermit-builtins
- name: Download loader
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: hermit-os/loader
file: hermit-loader-${{ matrix.arch }}
run: gh release download --repo hermit-os/loader --pattern hermit-loader-${{ matrix.arch }}
- name: Install virtiofsd
if: ${{ matrix.arch == 'x86_64' && matrix.package == 'rusty_demo' }}
run: cargo install --locked virtiofsd
Expand Down Expand Up @@ -265,16 +260,10 @@ jobs:
run: |
lscpu
kvm-ok
- name: Download loader (x86_64)
uses: dsaltares/fetch-gh-release-asset@master
with:
file: hermit-loader-x86_64
repo: hermit-os/loader
- name: Download loader (x86_64-fc)
uses: dsaltares/fetch-gh-release-asset@master
with:
file: hermit-loader-x86_64-fc
repo: hermit-os/loader
- name: Download loader (x86_64, x86_64-fc)
run: |
sudo apt-get install -y --no-install-recommends gh
gh release download --repo hermit-os/loader --pattern hermit-loader-x86_64 --pattern hermit-loader-x86_64-fc
- name: Install firecracker
run: |
# https://github.com/firecracker-microvm/firecracker/blob/v1.5.1/docs/getting-started.md#getting-a-firecracker-binary
Expand Down
2 changes: 1 addition & 1 deletion xtask/src/ci/firecracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl Firecracker {

let config = format!(
include_str!("firecracker_vm_config.json"),
kernel_image_path = "../hermit-loader-x86_64-fc",
kernel_image_path = "hermit-loader-x86_64-fc",
initrd_path = self.build.image().display()
);
eprintln!("firecracker config");
Expand Down
2 changes: 1 addition & 1 deletion xtask/src/ci/qemu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Qemu {
let qemu = cmd!(sh, "{qemu}")
.args(&["-display", "none"])
.args(&["-serial", "stdio"])
.args(&["-kernel", format!("../hermit-loader-{arch}").as_ref()])
.args(&["-kernel", format!("hermit-loader-{arch}").as_ref()])
.args(self.machine_args())
.args(self.cpu_args())
.args(&["-smp", &self.smp.to_string()])
Expand Down

0 comments on commit 6c45e85

Please sign in to comment.