Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Windows binary with Linux GCC #96

Merged
merged 4 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Matrix 32 and 64 bits
  • Loading branch information
duhow committed Dec 9, 2021
commit 9b741e009f7848ea1c4d0b8af12aec21c144b740
16 changes: 12 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ on:

jobs:
windows:
name: windows ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: i686
bits: "32"
- target: x86-64
bits: "64"
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -25,14 +33,14 @@ jobs:
run: |
sudo apt update
sudo apt install -y libbison-dev libfl-dev build-essential cmake flex bison libpthread-stubs0-dev libgtest-dev
sudo apt install -y gcc-mingw-w64-i686 g++-mingw-w64-i686
sudo apt install -y gcc-mingw-w64-${{ matrix.target }} g++-mingw-w64-${{ matrix.target }}
- name: make
run: make asmsx.exe
run: make asmsx${{ matrix.bits }}.exe
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: asmsx-win-x86_64
path: asmsx.exe
name: asmsx-win-${{ matrix.target }}
path: asmsx*.exe

linux:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ src/%.o: src/%.c

debug: asmsx-debug
asmsx.osx: CC := o64-clang
asmsx.exe: CROSS_COMPILE := i686-w64-mingw32-
asmsx.exe: asmsx32.exe
asmsx32.exe: CROSS_COMPILE := i686-w64-mingw32-
asmsx64.exe: CROSS_COMPILE := x86_64-w64-mingw32-
asmsx.arm: CROSS_COMPILE := arm-linux-gnueabi-
asmsx.arm: CFLAGS += -march=armv6
asmsx-debug: CFLAGS := -Og -ggdb
Expand Down