Skip to content

Commit 04579d4

Browse files
committed
Attempt to GitHub CI
1 parent 53de580 commit 04579d4

File tree

6 files changed

+136
-0
lines changed

6 files changed

+136
-0
lines changed

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
github: [kandowontu]
4+
patreon: kandowontu
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Bug Report
3+
about: Report any bugs you may find in Famidash.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
12+
13+
**How to reproduce**
14+
15+
16+
**Screenshots e/o videos**
17+
18+
19+
**Emulator(please complete the following information):**
20+
- Device: [e.g. PC, Phone]:
21+
- Emulator [e.g. RetroArch, Mesen]:
22+
- Core [ONLY if you use RetroArch]:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for Famidash
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Your idea...**
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Cache CC65
2+
description: Caches CC65 and builds it from source if missing
3+
inputs:
4+
cc65Ref:
5+
description: "CC65 Git Ref (used to checkout a fixed version)"
6+
required: false
7+
default: "master"
8+
cc65Path:
9+
description: "CC65 path to cache"
10+
required: false
11+
default: ${{ github.workspace }}/opt/cc65
12+
runs:
13+
using: "composite"
14+
steps:
15+
# Cache CC65
16+
- uses: actions/cache@v4
17+
id: cache_cc65
18+
with:
19+
path: ${{ inputs.cc65Path }}
20+
key: ${{ runner.os }}-cc65-${{ inputs.cc65Ref }}-${{ hashFiles('.github/actions/cache_cc65/*') }}
21+
# Checkout CC65
22+
- uses: actions/checkout@v4
23+
if: steps.cache_cc65.outputs.cache-hit != 'true'
24+
with:
25+
repository: cc65/cc65
26+
ref: ${{ inputs.cc65Ref }}
27+
path: './cc65'
28+
# Build CC65
29+
- if: steps.cache_cc65.outputs.cache-hit != 'true'
30+
run: |
31+
cd cc65
32+
PREFIX=${{ inputs.cc65Path }} make
33+
PREFIX=${{ inputs.cc65Path }} make install
34+
shell: bash
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Cache llvm-mos-sdk
2+
description: Caches llvm-mos-sdk and builds it from source if missing
3+
inputs:
4+
cc65Ref:
5+
description: "llvm-mos-sdk Git Ref (used to checkout a fixed version)"
6+
required: false
7+
default: "master"
8+
cc65Path:
9+
description: "llvm-mos-sdk path to cache"
10+
required: false
11+
default: ${{ github.workspace }}/opt/llvm-mos-sdk
12+
runs:
13+
using: "composite"
14+
steps:
15+
# Cache llvm-mos-sdk
16+
- uses: actions/cache@v4
17+
id: cache_cc65
18+
with:
19+
path: ${{ inputs.llvm-mos-sdkPath }}
20+
key: ${{ runner.os }}-llvm-mos-sdk-${{ inputs.llvm-mos-sdkRef }}-${{ hashFiles('.github/actions/cache_llvm-mos-sdk/*') }}
21+
# Checkout llvm-mos-sdk
22+
- uses: actions/checkout@v4
23+
if: steps.cache_llvm-mos-sdk.outputs.cache-hit != 'true'
24+
with:
25+
repository: llvm-mos/llvm-mos-sdk
26+
ref: ${{ inputs.llvm-mos-sdkRef }}
27+
path: './llvm-mos-sdk'
28+
# Build llvm-mos-sdk
29+
#- if: steps.cache_llvm-mos-sdk.outputs.cache-hit != 'true'
30+
# run: |
31+
# cd llvm-mos-sdk
32+
# PREFIX=${{ inputs.llvm-mos-sdkPath }} make
33+
# PREFIX=${{ inputs.llvm-mos-sdkPath }} make install
34+
# shell: bash

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build ROM
2+
3+
on: [push]
4+
5+
jobs:
6+
build_rom:
7+
runs-on: ubuntu-latest
8+
name: Compile ROM
9+
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
target:
14+
- { name: Main MMC3 ROM, target: main }
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Cache cc65
20+
uses: ./.github/actions/cache_cc65
21+
- name: Cache llvm-mos-sdk
22+
uses: ./.github/actions/cache_llvm-mos-sdk
23+
- name: Set path
24+
run: |
25+
echo "${{ github.workspace }}/opt/cc65/bin:${{ github.workspace }}/opt/llvm-mos-sdk/bin" >> $GITHUB_PATH
26+
- name: Build the game
27+
run: make ${{matrix.target.target}}
28+
- name: Upload artifacts
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: famidash.${{ matrix.target.target }}-llvm.nes
32+
path: BUILD/${{ matrix.target.target }}/famidash-llvm.nes

0 commit comments

Comments
 (0)