2022-11-01 21:00:07 -04:00
|
|
|
---
|
|
|
|
on:
|
2022-11-02 18:48:43 -04:00
|
|
|
push:
|
2022-12-03 23:18:52 -05:00
|
|
|
branches:
|
|
|
|
- "2.0"
|
2022-11-01 21:00:07 -04:00
|
|
|
|
2022-11-02 18:38:19 -04:00
|
|
|
env:
|
|
|
|
name: "epple2"
|
|
|
|
desc: "Apple ][ emulator"
|
|
|
|
|
2022-11-01 21:00:07 -04:00
|
|
|
jobs:
|
|
|
|
"build-roms":
|
|
|
|
runs-on: "ubuntu-latest"
|
|
|
|
steps:
|
2022-11-01 21:08:39 -04:00
|
|
|
- name: "Prepare runner"
|
2022-11-01 21:00:07 -04:00
|
|
|
run: |
|
|
|
|
set -x
|
2022-11-01 21:08:39 -04:00
|
|
|
sudo apt-get update -qqqq
|
|
|
|
sudo apt-get install -qqqq xa65
|
2022-11-01 21:00:07 -04:00
|
|
|
|
|
|
|
- uses: "actions/checkout@v3"
|
|
|
|
|
2022-11-04 11:11:42 -04:00
|
|
|
- name: "Build"
|
2022-11-01 21:00:07 -04:00
|
|
|
run: |
|
|
|
|
set -x
|
2022-12-04 16:33:27 -05:00
|
|
|
cd share/Resources/rom
|
2022-11-04 11:11:42 -04:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
2022-12-03 23:18:52 -05:00
|
|
|
cmake --build .
|
2022-11-01 21:08:39 -04:00
|
|
|
|
|
|
|
- uses: "actions/upload-artifact@v3"
|
|
|
|
with:
|
2022-11-01 21:12:29 -04:00
|
|
|
name: "epple2-roms"
|
2022-12-04 16:33:27 -05:00
|
|
|
path: "share/Resources/rom/*.a65"
|
2022-11-01 21:22:54 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-04 16:33:27 -05:00
|
|
|
"build":
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: "ubuntu-22.04"
|
|
|
|
shell: "bash"
|
|
|
|
- os: "macos-12"
|
|
|
|
shell: "bash"
|
|
|
|
- os: "windows-latest"
|
|
|
|
shell: "msys2 {0}"
|
2022-11-01 21:22:54 -04:00
|
|
|
|
2022-12-04 16:33:27 -05:00
|
|
|
runs-on: "${{ matrix.os }}"
|
2022-11-01 21:22:54 -04:00
|
|
|
|
2022-12-04 16:33:27 -05:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: "${{ matrix.shell }}"
|
2022-11-01 21:27:05 -04:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: "actions/checkout@v3"
|
|
|
|
|
2022-12-04 16:33:27 -05:00
|
|
|
- uses: "msys2/setup-msys2@v2"
|
|
|
|
if: ${{ runner.os == 'Windows' }}
|
2022-11-02 17:35:54 -04:00
|
|
|
with:
|
2022-12-04 16:33:27 -05:00
|
|
|
update: true
|
|
|
|
pacboy: >-
|
|
|
|
toolchain:p
|
|
|
|
cmake:p
|
|
|
|
ninja:p
|
|
|
|
boost:p
|
|
|
|
wxwidgets3.2-msw:p
|
|
|
|
SDL2:p
|
|
|
|
|
|
|
|
- name: "Set up environment"
|
|
|
|
run: "./bin/${{ runner.os }}/setup.sh"
|
2022-11-02 17:44:39 -04:00
|
|
|
|
|
|
|
- uses: "actions/download-artifact@v3"
|
|
|
|
with:
|
|
|
|
name: "epple2-roms"
|
2022-12-04 16:33:27 -05:00
|
|
|
path: "share/Resources/rom"
|
2022-11-02 17:44:39 -04:00
|
|
|
|
2022-12-04 16:33:27 -05:00
|
|
|
- name: "Build"
|
|
|
|
run: "./bin/build.sh"
|
2022-11-02 18:38:19 -04:00
|
|
|
|
|
|
|
- uses: "softprops/action-gh-release@v1"
|
|
|
|
with:
|
2022-12-04 16:33:27 -05:00
|
|
|
draft: true
|
|
|
|
prerelease: true
|
|
|
|
tag_name: "${{ env.git_tag }}"
|
2022-11-02 18:38:19 -04:00
|
|
|
files: |
|
2022-12-04 16:33:27 -05:00
|
|
|
tmp/cpack/*.zip
|
|
|
|
tmp/cpack/*.tar.gz
|
|
|
|
tmp/cpack/*.7z
|
|
|
|
tmp/cpack/*.deb
|
|
|
|
tmp/cpack/*.dmg
|
|
|
|
tmp/cpack/*.exe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# "build-epple2-ubuntu":
|
|
|
|
# needs: "build-roms"
|
|
|
|
# runs-on: "ubuntu-latest"
|
|
|
|
# steps:
|
|
|
|
# - name: "Prepare runner"
|
|
|
|
# run: |
|
|
|
|
# set -x
|
|
|
|
# sudo apt-get update -qqqq
|
|
|
|
# sudo apt-get install -qqqq libsdl2-dev tree
|
|
|
|
#
|
|
|
|
# - uses: "actions/checkout@v3"
|
|
|
|
#
|
|
|
|
# - name: "Build"
|
|
|
|
# run: |
|
|
|
|
# set -x
|
|
|
|
# mkdir build
|
|
|
|
# cd build
|
|
|
|
# cmake ..
|
|
|
|
# cmake --build .
|
|
|
|
#
|
|
|
|
# - uses: "actions/download-artifact@v3"
|
|
|
|
# with:
|
|
|
|
# name: "epple2-roms"
|
|
|
|
# path: "build/epple2-roms"
|
|
|
|
#
|
|
|
|
# - name: "Stage"
|
|
|
|
# run: |
|
|
|
|
# set -x
|
|
|
|
# pwd
|
|
|
|
# cd build
|
|
|
|
# mkdir -p stage/usr/local/bin
|
|
|
|
# mkdir -p stage/usr/local/etc/epple2
|
|
|
|
# mkdir -p stage/usr/local/lib/epple2/system
|
|
|
|
# mkdir -p stage/usr/local/lib/epple2/cards
|
|
|
|
# cp src/epple2 stage/usr/local/bin/
|
|
|
|
# cp conf/*.conf stage/usr/local/etc/epple2/
|
|
|
|
# cp epple2-roms/epple2sys.a65 stage/usr/local/lib/epple2/system/
|
|
|
|
# cp epple2-roms/stdout.a65 stage/usr/local/lib/epple2/cards/
|
|
|
|
# cp epple2-roms/stdin.a65 stage/usr/local/lib/epple2/cards/
|
|
|
|
# cp epple2-roms/clock.a65 stage/usr/local/lib/epple2/cards/
|
|
|
|
# tree stage
|
|
|
|
#
|
|
|
|
# - name: "Package"
|
|
|
|
# uses: "jiro4989/build-deb-action@v2"
|
|
|
|
# with:
|
|
|
|
# package: "${{ env.name }}"
|
|
|
|
# desc: "${{ env.desc }}"
|
|
|
|
# maintainer: "${{ github.repository_owner }}"
|
|
|
|
# version: "${{ github.ref }}"
|
|
|
|
# arch: "amd64"
|
|
|
|
# package_root: "build/stage"
|
|
|
|
# depends: "${{ env.deb_depends }}"
|
|
|
|
#
|
|
|
|
# - uses: "softprops/action-gh-release@v1"
|
|
|
|
# with:
|
|
|
|
# files: |
|
|
|
|
# *.deb
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# "build-epple2-macos":
|
|
|
|
# needs: "build-roms"
|
|
|
|
# runs-on: "macos-latest"
|
|
|
|
# steps:
|
|
|
|
# - name: "Prepare runner"
|
|
|
|
# run: |
|
|
|
|
# set -x
|
|
|
|
# HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2 tree
|
|
|
|
#
|
|
|
|
# - uses: "actions/checkout@v3"
|
|
|
|
#
|
|
|
|
# - name: "Build"
|
|
|
|
# run: |
|
|
|
|
# set -x
|
|
|
|
# mkdir build
|
|
|
|
# cd build
|
|
|
|
# cmake ..
|
|
|
|
# cmake --build .
|
|
|
|
#
|
|
|
|
# - uses: "actions/download-artifact@v3"
|
|
|
|
# with:
|
|
|
|
# name: "epple2-roms"
|
|
|
|
# path: "build/epple2-roms"
|
|
|
|
#
|
|
|
|
# - name: "Stage"
|
|
|
|
# run: |
|
|
|
|
# set -x
|
|
|
|
# pwd
|
|
|
|
# cd build
|
|
|
|
# mkdir -p stage/local/bin
|
|
|
|
# mkdir -p stage/local/etc/epple2
|
|
|
|
# mkdir -p stage/local/lib/epple2/system
|
|
|
|
# mkdir -p stage/local/lib/epple2/cards
|
|
|
|
# cp src/epple2 stage/local/bin/
|
|
|
|
# cp conf/*.conf stage/local/etc/epple2/
|
|
|
|
# cp epple2-roms/epple2sys.a65 stage/local/lib/epple2/system/
|
|
|
|
# cp epple2-roms/stdout.a65 stage/local/lib/epple2/cards/
|
|
|
|
# cp epple2-roms/stdin.a65 stage/local/lib/epple2/cards/
|
|
|
|
# cp epple2-roms/clock.a65 stage/local/lib/epple2/cards/
|
|
|
|
# cp /usr/local/lib/libSDL2.dylib stage/local/bin/
|
|
|
|
# tree stage
|
|
|
|
#
|
|
|
|
# - name: "Package"
|
|
|
|
# run: |
|
|
|
|
# set -x
|
|
|
|
# pkgbuild --identifier nu.mine.mosher.$name --root build/stage --install-location /usr $name.pkg
|
|
|
|
#
|
|
|
|
# - uses: "softprops/action-gh-release@v1"
|
|
|
|
# with:
|
|
|
|
# files: |
|
|
|
|
# *.pkg
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# "build-epple2-windows":
|
|
|
|
# needs: "build-roms"
|
|
|
|
# runs-on: "windows-latest"
|
|
|
|
# steps:
|
|
|
|
# - name: "Prepare runner"
|
|
|
|
# run: |
|
|
|
|
# Invoke-WebRequest -Uri "https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-devel-2.24.2-VC.zip" -OutFile "C:/Program Files/SDL2-devel-VC.zip"
|
|
|
|
# Expand-Archive -LiteralPath "C:/Program Files/SDL2-devel-VC.zip" -DestinationPath "C:/Program Files/"
|
|
|
|
#
|
|
|
|
# - uses: "actions/checkout@v3"
|
|
|
|
#
|
|
|
|
# - name: "Build"
|
|
|
|
# shell: "bash"
|
|
|
|
# run: |
|
|
|
|
# set -x
|
|
|
|
# mkdir build
|
|
|
|
# cd build
|
|
|
|
# cmake ..
|
|
|
|
# cmake --build .
|
|
|
|
#
|
|
|
|
# - uses: "actions/download-artifact@v3"
|
|
|
|
# with:
|
|
|
|
# name: "epple2-roms"
|
|
|
|
# path: "build/epple2-roms"
|
|
|
|
#
|
|
|
|
# - name: "Stage"
|
|
|
|
# shell: "bash"
|
|
|
|
# run: |
|
|
|
|
# set -x
|
|
|
|
# pwd
|
|
|
|
# cd build
|
|
|
|
# mkdir -p stage/epple2/etc/epple2
|
|
|
|
# mkdir -p stage/epple2/lib/epple2/system
|
|
|
|
# mkdir -p stage/epple2/lib/epple2/cards
|
|
|
|
# cp src/Debug/epple2.exe stage/epple2/
|
|
|
|
# cp conf/*.conf stage/epple2/etc/epple2/
|
|
|
|
# cp epple2-roms/epple2sys.a65 stage/epple2/lib/epple2/system/
|
|
|
|
# cp epple2-roms/stdout.a65 stage/epple2/lib/epple2/cards/
|
|
|
|
# cp epple2-roms/stdin.a65 stage/epple2/lib/epple2/cards/
|
|
|
|
# cp epple2-roms/clock.a65 stage/epple2/lib/epple2/cards/
|
|
|
|
# cp "C:/Program Files/SDL2-2.24.2/lib/x64/SDL2.dll" stage/epple2/
|
|
|
|
#
|
|
|
|
# - name: "Package"
|
|
|
|
# uses: "thedoctor0/zip-release@main"
|
|
|
|
# with:
|
|
|
|
# directory: "build/stage"
|
|
|
|
# path: "${{ env.name }}"
|
|
|
|
# filename: "${{ env.name }}-windows.zip"
|
|
|
|
#
|
|
|
|
# - uses: "softprops/action-gh-release@v1"
|
|
|
|
# with:
|
|
|
|
# files: |
|
|
|
|
# build/stage/*.zip
|