Skip to content

Commit

Permalink
GitHub Actions: Add macOS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
fruhland committed May 21, 2024
1 parent 6846234 commit 4028efd
Showing 1 changed file with 76 additions and 2 deletions.
78 changes: 76 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: build
on: [push]

jobs:
build:
build-on-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -43,4 +43,78 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: D3OS
path: d3os.img
path: d3os.img

build-on-intel-mac:
runs-on: macos-12
steps:
- uses: actions/checkout@v4

- name: Install packages
uses: amitie10g/[email protected]
with:
brew: x86_64-elf-binutils wget nasm

- name: Install Rust for x86-64 MacOS
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
target: x86_64-apple-darwin
components: rust-src
- name: Install Rust for i686 UEFI
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: i686-unknown-uefi
- name: Install Rust for x86_64 UEFI
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: x86_64-unknown-uefi

- name: Install cargo-make
run: cargo install --no-default-features cargo-make

- name: Install towbootctl
run: cargo install --git https://github.com/hhuOS/towboot --features=binary -Z bindeps towbootctl

- name: Build
run: cargo make --no-workspace image

build-on-apple-silicon-mac:
runs-on: macos-14
steps:
- uses: actions/checkout@v4

- name: Install packages
uses: amitie10g/[email protected]
with:
brew: x86_64-elf-binutils wget nasm

- name: Install Rust for x86-64 MacOS
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
target: x86_64-apple-darwin
components: rust-src
- name: Install Rust for i686 UEFI
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: i686-unknown-uefi
- name: Install Rust for x86_64 UEFI
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: x86_64-unknown-uefi

- name: Install cargo-make
run: cargo install --no-default-features cargo-make

- name: Install towbootctl
run: cargo install --git https://github.com/hhuOS/towboot --features=binary -Z bindeps towbootctl

- name: Build
run: cargo make --no-workspace image

0 comments on commit 4028efd

Please sign in to comment.