diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23c9c3d..941ad12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,27 +16,32 @@ on: jobs: windows: - runs-on: windows-latest + name: windows ${{ matrix.target }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - target: i686 + bits: "32" + - target: x86-64 + bits: "64" steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - - name: Setup NuGet.exe for use with actions - uses: NuGet/setup-nuget@v1.0.5 - name: install deps run: | - nuget restore build/vs2019/asmsx.sln - nuget install build/vs2019/asmsx-gtest/packages.config -OutputDirectory build/vs2019/asmsx-gtest/packages - choco install winflexbison + 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-${{ matrix.target }} g++-mingw-w64-${{ matrix.target }} - name: make - run: msbuild build/vs2019/asmsx.sln + run: make asmsx${{ matrix.bits }}.exe - name: upload artifact uses: actions/upload-artifact@v2 with: - name: asmsx-win-x86_64 - path: build/vs2019/Debug/asmsx.exe + name: asmsx-win-${{ matrix.target }} + path: asmsx*.exe linux: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 7689e64..6048af4 100644 --- a/Makefile +++ b/Makefile @@ -61,13 +61,15 @@ 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 asmsx-debug: FLEX_FLAGS += -d asmsx-debug: BISON_FLAGS += --graph -t -asmsx asmsx.osx asmsx.exe asmsx.arm: $(ALL_FILES) $(HEADERS) +asmsx asmsx.osx asmsx.exe asmsx32.exe asmsx64.exe asmsx.arm: $(ALL_FILES) $(HEADERS) $(CROSS_COMPILE)$(CC) $(ALL_FILES) -o$@ $(LDFLAGS) $(CFLAGS) $(LIBS) $(OPTS) asmsx-debug: $(ALL_FILES) $(HEADERS) src/dura.y src/lex.l