2024-11-16 21:02:30 +00:00
|
|
|
name: Setup MinGW on Ubuntu
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
arch:
|
|
|
|
required: true
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- name: Set up MinGW for x86_64
|
|
|
|
if: inputs.arch == 'x86_64'
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-11-18 00:57:25 +00:00
|
|
|
sudo apt-get install g++-mingw-w64-x86-64-posix
|
|
|
|
# sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
|
|
|
|
# sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
2024-11-16 21:02:30 +00:00
|
|
|
|
|
|
|
- name: Set up MinGW for x86_32
|
|
|
|
if: inputs.arch == 'x86_32'
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-11-18 00:57:25 +00:00
|
|
|
sudo apt-get install g++-mingw-w64-i686-posix
|
|
|
|
# sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
|
|
|
|
# sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
|
2024-11-16 21:02:30 +00:00
|
|
|
|
|
|
|
- name: Set up LLVM MinGW for arm64
|
|
|
|
if: inputs.arch == 'arm64'
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20240619/llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64.tar.xz
|
|
|
|
tar xf llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64.tar.xz
|
|
|
|
rm -f llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64.tar.xz
|
|
|
|
mv -f llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64 llvm-mingw
|
|
|
|
echo "MINGW_PREFIX=${GITHUB_WORKSPACE}/llvm-mingw" >> "$GITHUB_ENV"
|