Skip to content

Commit cff784d

Browse files
committed
Build both 32bit and 64bit for windows
1 parent f1794b5 commit cff784d

File tree

2 files changed

+41
-15
lines changed

2 files changed

+41
-15
lines changed

.github/workflows/c-cpp.yml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,58 @@ on:
66
- '*'
77
jobs:
88
publish:
9-
name: Publish for ${{ matrix.os }}
9+
name: Publish for ${{ matrix.os }}-${{matrix.arch}}
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
1313
include:
1414
- os: ubuntu-latest
1515
artifact_name: bin/bossac
16-
asset_name: qbossa-linux-amd64
16+
asset_name: qbossa
17+
arch: amd64
18+
suffix: -linux-amd64
1719
- os: windows-latest
1820
artifact_name: bin/bossac.exe
19-
asset_name: qbossa-windows-amd64.exe
21+
asset_name: qbossa
22+
arch: i686
23+
msystem: MINGW32
24+
suffix: -win32.exe
25+
- os: windows-latest
26+
artifact_name: bin/bossac.exe
27+
asset_name: qbossa
28+
arch: x86_64
29+
msystem: MINGW64
30+
suffix: -win64.exe
2031
- os: macos-latest
2132
artifact_name: bin/bossac
22-
asset_name: qbossa-macos-amd64
33+
asset_name: qbossa
34+
arch: amd64
35+
suffix: -mac
36+
2337
steps:
2438
- uses: actions/checkout@v2
2539
- name: Inject slug/short variables
2640
uses: rlespinasse/github-slug-action@v3.x
27-
- name: info
28-
run: |
29-
echo ${{matrix.artifact_name}}
30-
echo ${{matrix.os}}
31-
echo ${{matrix.asset_name}}
32-
- name: make
33-
run: make bossac
41+
- name: get msys2
42+
uses: msys2/setup-msys2@v2
43+
if: ${{matrix.os == 'windows-latest'}}
44+
with:
45+
msystem: ${{ matrix.msystem }}
46+
install: git base-devel binutils mingw-w64-${{ matrix.arch }}-toolchain
47+
release: false
48+
- name: make (win)
49+
if: ${{matrix.os == 'windows-latest'}}
50+
shell: msys2 {0}
51+
run: make bossac
52+
- name: make (not win)
53+
if: ${{matrix.os != 'windows-latest'}}
54+
run: make bossac
3455
- name: Upload file
3556
uses: svenstaro/upload-release-action@v2
3657
with:
3758
repo_token: ${{ secrets.GITHUB_TOKEN }}
3859
file: ${{matrix.artifact_name}}
39-
asset_name: ${{matrix.asset_name}}
60+
asset_name: ${{matrix.asset_name}}-${{env.GITHUB_REF_SLUG}}${{matrix.suffix}}
4061
tag: ${{github.ref}}
4162
overwrite: true
4263
body: "Release ${{env.GITHUB_REF_SLUG}} of qNimble verion of BOSSA"

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@ INSTALLDIR=install
2929
# Determine OS
3030
#
3131
OS:=$(shell uname -s | cut -c -7)
32-
OS_SHORT:=$(shell uname -s | cut -c -5)
33-
32+
ifeq ($(OS),MSYS_NT)
33+
OS:=WIN
34+
else ifeq ($(OS),MINGW32)
35+
OS:=WIN
36+
else ifeq ($(OS),MINGW64)
37+
OS:=WIN
38+
endif
3439
#
3540
# Windows rules
3641
#
37-
ifeq ($(OS_SHORT),MINGW)
42+
ifeq ($(OS),WIN)
3843
# Use wxWindows development branch to work around font scaling issues on Windows
3944
WXVERSION=3.1
4045
EXE=.exe

0 commit comments

Comments
 (0)