0.4.0/misc #80
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
name: macOS | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
macos-arm: | |
name: martypc (arm) | |
runs-on: macos-14 | |
steps: | |
- name: Install nightly Rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh | |
sh rustup-init.sh -y --default-host aarch64-apple-darwin --default-toolchain nightly --profile complete | |
. "$HOME/.cargo/env" | |
$HOME/.cargo/bin/cargo version | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cargo build | |
run: cargo +nightly build --profile release-lto --features use_winit,use_wgpu,sound,opl | |
- name: Copy files into install dir | |
run: cp LICENSE README.md CHANGELOG.md CREDITS.md target/release-lto/martypc install | |
- name: Rename install directory | |
run: mv install martypc | |
- name: Create artifact directory | |
run: mkdir artifacts | |
# GitHub zips all artifacts, losing file permissions. | |
# We'll need to tar the directory in order to | |
# preserve the file permissions | |
- name: Create artifact from install directory | |
run: tar cvf artifacts/martypc.tar martypc | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: 'martypc-${{ github.job }}-gha${{ github.run_number }}' | |
path: artifacts/martypc.tar | |
macos-x86: | |
name: martypc (x86) | |
runs-on: macos-13 | |
steps: | |
- name: Install nightly Rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh | |
sh rustup-init.sh -y --default-host x86_64-apple-darwin --default-toolchain nightly --profile complete | |
. "$HOME/.cargo/env" | |
$HOME/.cargo/bin/cargo version | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cargo build | |
run: cargo +nightly build --profile release-lto --features use_winit,use_wgpu,sound,opl | |
- name: Copy files into install dir | |
run: cp LICENSE README.md CHANGELOG.md CREDITS.md target/release-lto/martypc install | |
- name: Rename install directory | |
run: mv install martypc | |
- name: Create artifact directory | |
run: mkdir artifacts | |
# GitHub zips all artifacts, losing file permissions. | |
# We'll need to tar the directory in order to | |
# preserve the file permissions | |
- name: Create artifact from install directory | |
run: tar cvf artifacts/martypc.tar martypc | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: 'martypc-${{ github.job }}-gha${{ github.run_number }}' | |
path: artifacts/martypc.tar |