Skip to content

Commit

Permalink
CI: install toolchain to build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
rasky committed Dec 11, 2023
1 parent d63d5b0 commit eb34240
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions .github/workflows/build-tool-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,34 @@ jobs:
{ sys: mingw32, arch: i686, build: tools}
]
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
install: >-
base-devel
mingw-w64-${{ matrix.arch }}-toolchain
update: true
- name: Download and extract latest toolchain
shell: C:\shells\msys2bash.cmd {0}
run: |
pacman -S --noconfirm base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-libpng unzip
curl -Lo gcc-toolchain-mips64-win64.zip https://github.com/DragonMinded/libdragon/releases/download/toolchain-continuous-prerelease/gcc-toolchain-mips64-win64.zip
unzip gcc-toolchain-mips64-win64.zip -d gcc-toolchain-mips64
rm -f gcc-toolchain-mips64-win64.zip
echo "N64_INST=$(pwd)/gcc-toolchain-mips64" >>$GITHUB_ENV
# - uses: msys2/setup-msys2@v2
# with:
# msystem: ${{matrix.sys}}
# install: >-
# base-devel
# mingw-w64-${{ matrix.arch }}-toolchain
# update: true

- uses: actions/checkout@v3
with:
fetch-depth: 1 # Using a shallow checkout. Change to `0` if a full fetch is required.

- name: Correct MSYS2 pthread.h to allow static libraries (otherwise you would need to use a lib DLL, rather than it being built into the EXE.)
shell: msys2 {0}
run: |
sed -z 's/#else\n#define WINPTHREAD_API __declspec(dllimport)/#else\n#define WINPTHREAD_API/' /${{matrix.sys}}/include/pthread.h
# - name: Correct MSYS2 pthread.h to allow static libraries (otherwise you would need to use a lib DLL, rather than it being built into the EXE.)
# shell: C:\shells\msys2bash.cmd {0}
# run: |
# sed -z 's/#else\n#define WINPTHREAD_API __declspec(dllimport)/#else\n#define WINPTHREAD_API/' /msys64/include/pthread.h

- name: Build ${{ matrix.build }}
shell: msys2 {0}
shell: C:\shells\msys2bash.cmd {0}
run: |
make ${{ matrix.build }}
Expand Down

0 comments on commit eb34240

Please sign in to comment.