Create symfiles on build
This commit is contained in:
@@ -7,11 +7,23 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Checkout agbcc
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
path: 'agbcc'
|
||||
repository: 'pret/agbcc'
|
||||
|
||||
- name: Checkout symbols
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
path: 'symbols'
|
||||
ref: 'symbols'
|
||||
|
||||
- name: Install binutils
|
||||
run: sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
|
||||
# build-essential, git, and libpng-dev are already installed
|
||||
@@ -20,10 +32,9 @@ jobs:
|
||||
|
||||
- name: Install agbcc
|
||||
run: |
|
||||
git clone https://github.com/pret/agbcc.git
|
||||
cd agbcc
|
||||
./build.sh
|
||||
./install.sh ../
|
||||
working-directory: ./agbcc
|
||||
|
||||
- name: Compare FireRed
|
||||
run: |
|
||||
@@ -45,3 +56,17 @@ jobs:
|
||||
CALCROM_DISCORD_WEBHOOK_AVATAR_URL: https://i.imgur.com/38BQHdd.png
|
||||
CALCROM_DISCORD_WEBHOOK_URL: ${{ secrets.CALCROM_DISCORD_WEBHOOK_URL }}
|
||||
run: sh .github/calcrom/webhook.sh pokefirered
|
||||
|
||||
- name: Move symfiles
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
run: |
|
||||
cp *.sym symbols/
|
||||
|
||||
- name: Update symfiles
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: EndBug/add-and-commit@v7
|
||||
with:
|
||||
branch: symbols
|
||||
cwd: "./symbols"
|
||||
add: "*.sym"
|
||||
message: ${{ github.event.commits[0].message }}
|
||||
|
||||
@@ -24,6 +24,7 @@ export AS := $(PREFIX)as
|
||||
endif
|
||||
export CPP := $(PREFIX)cpp
|
||||
export LD := $(PREFIX)ld
|
||||
OBJDUMP := $(PREFIX)objdump
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
EXE := .exe
|
||||
@@ -57,6 +58,7 @@ OBJ_DIR := build/$(BUILD_NAME)
|
||||
|
||||
ELF = $(ROM:.gba=.elf)
|
||||
MAP = $(ROM:.gba=.map)
|
||||
SYM = $(ROM:.gba=.sym)
|
||||
|
||||
C_SUBDIR = src
|
||||
DATA_C_SUBDIR = src/data
|
||||
@@ -149,13 +151,15 @@ TOOLS = $(foreach tool,$(TOOLBASE),tools/$(tool)/$(tool)$(EXE))
|
||||
ALL_BUILDS := firered firered_rev1 leafgreen leafgreen_rev1
|
||||
ALL_BUILDS += $(ALL_BUILDS:%=%_modern)
|
||||
|
||||
.PHONY: all rom tools clean-tools mostlyclean clean compare tidy berry_fix $(TOOLDIRS) $(ALL_BUILDS) $(ALL_BUILDS:%=compare_%) modern
|
||||
.PHONY: all rom tools clean-tools mostlyclean clean compare tidy berry_fix syms $(TOOLDIRS) $(ALL_BUILDS) $(ALL_BUILDS:%=compare_%) modern
|
||||
|
||||
MAKEFLAGS += --no-print-directory
|
||||
|
||||
AUTO_GEN_TARGETS :=
|
||||
|
||||
all: tools rom
|
||||
all: tools rom syms
|
||||
|
||||
syms: $(SYM)
|
||||
|
||||
rom: $(ROM)
|
||||
ifeq ($(COMPARE),1)
|
||||
@@ -344,3 +348,10 @@ leafgreen_modern: ; @$(MAKE) GAME_VERSION=LEAFGREEN MODERN=1
|
||||
leafgreen_rev1_modern: ; @$(MAKE) GAME_VERSION=LEAFGREEN GAME_REVISION=1 MODERN=1
|
||||
|
||||
modern: ; @$(MAKE) MODERN=1
|
||||
|
||||
###################
|
||||
### Symbol file ###
|
||||
###################
|
||||
|
||||
$(SYM): $(ELF)
|
||||
$(OBJDUMP) -t $< | sort -u | grep -E "^0[2389]" > $@
|
||||
Reference in New Issue
Block a user