Skip to content

Commit

Permalink
CI fixes (#173)
Browse files Browse the repository at this point in the history
* Use bash as default shell

* Pass binutils path to compile.sh
  • Loading branch information
cadmic authored Sep 4, 2024
1 parent 356fc1b commit 52d16f9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:
build:
container: ghcr.io/zeldaret/oot-gc-vc-build:main
runs-on: ubuntu-latest
defaults:
run:
shell: bash

steps:
# Checkout the repository (shallow clone)
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
)
parser.add_argument(
"--binutils",
metavar="BINARY",
metavar="DIR",
type=Path,
help="path to binutils (optional)",
)
Expand Down
2 changes: 1 addition & 1 deletion tools/asm_processor/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ $PYTHON tools/asm_processor/asm_processor.py "$IN" > "$TEMP/$STEM.c"
$CC "$TEMP/$STEM.c" -c -o "$TEMP"
$PYTHON tools/asm_processor/asm_processor.py "$IN" --post-process "$TEMP/$STEM.o" --assembler "$AS" --asm-prelude include/macros.inc
# Remove sections that don't work with our reloc hacks
build/binutils/powerpc-eabi-objcopy --remove-section .mwcats.text --remove-section .comment "$TEMP/$STEM.o" "$OUT"
${BINUTILS_PATH:-build/binutils}/powerpc-eabi-objcopy --remove-section .mwcats.text --remove-section .comment "$TEMP/$STEM.o" "$OUT"
# Copy depfile, replacing the first line with the correct input/output files
( echo "$OUT: $IN \\"; tail -n +2 "$TEMP/$STEM.d" ) > "${OUT%.*}.d"
7 changes: 5 additions & 2 deletions tools/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,12 @@ def write_cargo_rule():
mwcc_sjis_implicit.append(transform_dep)
mwcc_asm_processor_implicit.append(transform_dep)
mwcc_asm_processor_sjis_implicit.append(transform_dep)

mwcc_asm_processor_cmd = f'env "BINUTILS_PATH={binutils}" ' + mwcc_asm_processor_cmd
mwcc_asm_processor_sjis_cmd = f'env "BINUTILS_PATH={binutils}" ' + mwcc_asm_processor_sjis_cmd
else:
mwcc_asm_processor_cmd = "sh " + mwcc_asm_processor_cmd
mwcc_asm_processor_sjis_cmd = "sh " + mwcc_asm_processor_sjis_cmd
mwcc_asm_processor_cmd = f'set "BINUTILS_PATH={binutils}" && sh ' + mwcc_asm_processor_cmd
mwcc_asm_processor_sjis_cmd = f'set "BINUTILS_PATH={binutils}" && sh ' + mwcc_asm_processor_sjis_cmd

n.comment("Link ELF file")
n.rule(
Expand Down

0 comments on commit 52d16f9

Please sign in to comment.