Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build MacOS version on Github #98

Merged
merged 2 commits into from
Dec 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 55 additions & 48 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
uses: actions/checkout@v2.2.0
if: ${{ github.event.pull_request }}
with:
repository: vintagepc/MINI404.git
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
submodules: false

- name: Checkout ${{ github.event.ref }}
uses: actions/checkout@v2.2.0
if: ${{ !github.event.pull_request }}
with:
repository: vintagepc/MINI404.git
repository: ${{ github.repository }}
ref: ${{ github.event.ref }}
submodules: false

Expand Down Expand Up @@ -96,49 +96,51 @@ jobs:
name: Binaries
path: ${{ runner.workspace }}/MINI404/build/Mini404-dev-linux.tar.bz2

# build_osx:
# # The type of runner that the job will run on
# runs-on: macos-latest
# if: "!contains(github.event.head_commit.message, 'NO_BUILD')"
# # Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - name: Checkout ${{ github.event.pull_request.head.ref }}
# uses: actions/checkout@v2.2.0
# if: ${{ github.event.pull_request }}
# with:
# repository: vintagepc/MK404.git
# ref: ${{ github.event.pull_request.head.sha }}
# submodules: true

# - name: Checkout ${{ github.event.ref }}
# uses: actions/checkout@v2.2.0
# if: ${{ !github.event.pull_request }}
# with:
# repository: vintagepc/MK404.git
# ref: ${{ github.event.ref }}
# submodules: true

# - name: Install packages
# run: |
# brew cask install xquartz
# brew tap osx-cross/avr
# brew install libelf freeglut glew SDL avr-gcc libpng

# - name: Prepare CMake build
# run: mkdir ${{ runner.workspace }}/MK404/build && cd ${{ runner.workspace }}/MK404/build && cmake -DCMAKE_BUILD_TYPE=RELEASE ..

# - name: Build Einsy
# run: |
# cd ${{ runner.workspace }}/MK404/build && make -j2
# cp MK404 MK404_OSX

# - name: Upload OSX artifact
# if: ${{ !github.event.pull_request }}
# uses: actions/upload-artifact@v2
# with:
# name: Binaries
# path: ${{ runner.workspace }}/MK404/build/MK404_OSX
build_macos:
# The type of runner that the job will run on
runs-on: macos-latest
if: "!contains(github.event.head_commit.message, 'NO_BUILD')"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout ${{ github.event.pull_request.head.ref }}
uses: actions/checkout@v2.2.0
if: ${{ github.event.pull_request }}
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
submodules: true

- name: Checkout ${{ github.event.ref }}
uses: actions/checkout@v2.2.0
if: ${{ !github.event.pull_request }}
with:
repository: ${{ github.repository }}
ref: ${{ github.event.ref }}
submodules: true

- name: Install dependencies
run: brew install libffi gettext glib pkg-config autoconf automake pixman ninja make

- name: Configure build
run: cd ${{ runner.workspace }}/MINI404 && ./configure --target-list="buddy-softmmu"

- name: Build qemu-system-buddy
run: cd ${{ runner.workspace }}/MINI404 && gmake -j3

- name: Assemble artifacts
if: ${{ !github.event.pull_request }}
run: |
cd ${{ runner.workspace }}/MINI404/build
mv buddy-softmmu Mini404-dev-macos
tar -jhcvf Mini404-dev-macos.tar.bz2 Mini404-dev-macos

- name: Upload artifact
if: ${{ !github.event.pull_request }}
uses: actions/upload-artifact@v2
with:
name: Binaries
path: ${{ runner.workspace }}/MINI404/build/Mini404-dev-macos.tar.bz2

build_cygwin:
# The type of runner that the job will run on
Expand Down Expand Up @@ -174,15 +176,15 @@ jobs:
uses: actions/checkout@v2.2.0
if: ${{ github.event.pull_request }}
with:
repository: vintagepc/MINI404.git
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
submodules: false

- name: Checkout ${{ github.event.ref }}
uses: actions/checkout@v2.2.0
if: ${{ !github.event.pull_request }}
with:
repository: vintagepc/MINI404.git
repository: ${{ github.repository }}
ref: ${{ github.event.ref }}
submodules: false

Expand Down Expand Up @@ -231,7 +233,7 @@ jobs:
Publish:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request }}
needs: [build_linux, build_cygwin]
needs: [build_linux, build_cygwin, build_macos]
steps:
- name: Retrieve platform binaries
uses: actions/download-artifact@v2
Expand All @@ -247,10 +249,13 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
run: |
tar -jxvf Mini404-dev-linux.tar.bz2
tar -jxvf Mini404-dev-macos.tar.bz2
unzip Mini404-dev-w64.zip
mv Mini404-dev-linux Mini404-${{ steps.get_version.outputs.VERSION }}-linux
mv Mini404-dev-macos Mini404-${{ steps.get_version.outputs.VERSION }}-macos
mv Mini404-dev-w64 Mini404-${{ steps.get_version.outputs.VERSION }}-w64
tar -jcvf Mini404-${{ steps.get_version.outputs.VERSION }}-linux.tar.bz2 Mini404-${{ steps.get_version.outputs.VERSION }}-linux
tar -jcvf Mini404-${{ steps.get_version.outputs.VERSION }}-macos.tar.bz2 Mini404-${{ steps.get_version.outputs.VERSION }}-macos
zip -r Mini404-${{ steps.get_version.outputs.VERSION }}-w64.zip Mini404-${{ steps.get_version.outputs.VERSION }}-w64

- name: RELEASE THE KRAKEN
Expand All @@ -261,6 +266,7 @@ jobs:
prerelease: false
files: |
Mini404-${{ steps.get_version.outputs.VERSION }}-linux.tar.bz2
Mini404-${{ steps.get_version.outputs.VERSION }}-macos.tar.bz2
Mini404-${{ steps.get_version.outputs.VERSION }}-w64.zip

- name: Publish prerelease
Expand All @@ -273,5 +279,6 @@ jobs:
title: "Latest (Development) Build"
files: |
Mini404-dev-linux.tar.bz2
Mini404-dev-macos.tar.bz2
Mini404-dev-w64.zip