Epple-II/.github/workflows/build.yaml

121 lines
2.4 KiB
YAML

---
on:
push:
branches:
- "2.0"
env:
name: "epple2"
desc: "Apple ][ emulator"
jobs:
"build-roms":
runs-on: "ubuntu-latest"
steps:
- name: "Prepare runner"
run: |
set -x
sudo apt-get update -qqqq
sudo apt-get install -qqqq xa65
- uses: "actions/checkout@v3"
- name: "Build"
run: |
set -x
cd share/Resources/rom
mkdir build
cd build
cmake ..
cmake --build .
- uses: "actions/upload-artifact@v3"
with:
name: "epple2-roms"
path: "share/Resources/rom/*.a65"
"fetch-apple":
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- name: "Fetch"
run: |
set -x
cd share/Resources/apple
./fetch.sh
- uses: "actions/upload-artifact@v3"
with:
name: "apple2-artifacts"
path: "share/Resources/apple/stage/*"
"build":
needs:
- "build-roms"
- "fetch-apple"
strategy:
matrix:
include:
- os: "ubuntu-22.04"
shell: "bash"
- os: "macos-12"
shell: "bash"
- os: "windows-latest"
shell: "msys2 {0}"
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: "${{ matrix.shell }}"
steps:
- uses: "actions/checkout@v3"
- uses: "msys2/setup-msys2@v2"
if: ${{ runner.os == 'Windows' }}
with:
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"
- uses: "actions/download-artifact@v3"
with:
name: "epple2-roms"
path: "share/Resources/rom"
- uses: "actions/download-artifact@v3"
with:
name: "apple2-artifacts"
path: "share/Resources/apple/stage"
- name: "Build"
run: "./bin/build.sh"
- uses: "softprops/action-gh-release@v1"
with:
draft: true
prerelease: true
tag_name: "${{ env.git_tag }}"
files: |
tmp/cpack/*.zip
tmp/cpack/*.tar.gz
tmp/cpack/*.7z
tmp/cpack/*.deb
tmp/cpack/*.dmg
tmp/cpack/*.exe