diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 261dbfbe9..21c9f449b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,10 +40,7 @@ img: script: - | source "$HOME/.cargo/env" && - curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash && - cargo binstall --no-confirm --version 0.1.1 cargo-config && - cargo binstall --no-confirm --version 1.16.0 just && - cargo binstall --no-confirm --version 0.27.0 cbindgen && + bash podman/rustinstall.sh && cargo build --manifest-path installer/Cargo.toml --release && PODMAN_BUILD=0 REPO_BINARY=1 make ci-img IMG_TAG=$CI_COMMIT_REF_NAME && ([ $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" ] && rm -rf build/img/* || true) diff --git a/mk/qemu.mk b/mk/qemu.mk index de43e4299..7b6930f31 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -80,6 +80,11 @@ else ifeq ($(ARCH),aarch64) QEMUFLAGS+=-device qemu-xhci -device usb-kbd -device usb-tablet endif endif + + # Default to using HVF when host is MacOS Silicon + ifeq ($(HOST_ARCH),arm64) + kvm?=yes + endif else ifeq ($(ARCH),riscv64gc) live=no efi=yes @@ -263,7 +268,11 @@ ifeq ($(UNAME),Linux) endif ifeq ($(UNAME),Darwin) - QEMUFLAGS+=-cpu $(QEMU_CPU) + ifneq ($(kvm),no) + QEMUFLAGS+=-accel hvf -cpu max + else + QEMUFLAGS+=-cpu $(QEMU_CPU) + endif endif ifneq ($(PFLASH0),) diff --git a/podman/rustinstall.sh b/podman/rustinstall.sh index 2210dcc20..e229bdcbe 100755 --- a/podman/rustinstall.sh +++ b/podman/rustinstall.sh @@ -5,10 +5,8 @@ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable -SCCACHE_PATH=https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-$(uname -m)-unknown-linux-musl.tar.gz -curl -sSL $SCCACHE_PATH | tar -xz -C ~/.cargo/bin --strip-components=1 --wildcards '*/sccache' -export RUSTC_WRAPPER=sccache - -cargo +stable install --force --version 0.1.1 cargo-config -cargo +stable install --force --version 1.16.0 just -cargo +stable install --force --version 0.27.0 cbindgen +curl -sSLf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash +cargo +stable binstall --no-confirm --force --version 0.10.0 sccache +cargo +stable binstall --no-confirm --force --version 1.16.0 just +cargo +stable binstall --no-confirm --force --version 0.27.0 cbindgen +cargo +stable install --force --version 0.1.1 cargo-config # TODO: Remove