Skip to content

Commit 9eef81d

Browse files
aor: Enable Windows CI with one compiler first
1 parent 81343b6 commit 9eef81d

File tree

2 files changed

+39
-30
lines changed

2 files changed

+39
-30
lines changed

.github/workflows/tests.yml

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: [ "master" ]
66
pull_request:
7+
branches: [ "master" ]
78
workflow_dispatch:
89

910
jobs:
@@ -70,33 +71,41 @@ jobs:
7071
- name: make install
7172
run: CC="${{ matrix.compiler }}" make prefix=$(pwd)/install install
7273

73-
# windows-x86-64-cross:
74-
# runs-on: windows-latest
75-
# strategy:
76-
# matrix:
77-
# include:
78-
# - { sys: mingw64, base: x86_64, env: cross-mingwarm64, prefix: aarch64-w64-mingw32, compiler: gcc }
79-
# # - { sys: mingw64, base: x86_64, env: cross, prefix: aarch64-w64-mingw32, compiler: clang }
80-
# defaults:
81-
# run:
82-
# shell: msys2 {0}
83-
# steps:
84-
# - uses: actions/checkout@v4
85-
# - uses: msys2/setup-msys2@v2
86-
# with:
87-
# msystem: ${{matrix.sys}}
88-
# install: >
89-
# mingw-w64-${{matrix.base}}-openssl
90-
# mingw-w64-${{matrix.base}}-qemu
91-
# make
92-
# mingw-w64-${{matrix.env}}-${{matrix.compiler}}
93-
# mingw-w64-${{matrix.env}}-binutils
94-
# mingw-w64-${{matrix.env}}-winpthreads
95-
# - name: OS Version
96-
# run: uname -s
97-
# - name: configure
98-
# run: cp config.mk.dist config.mk
99-
# - name: make
100-
# run: CC="/opt/bin/${{matrix.prefix}}-${{matrix.compiler}}.exe" CROSS_COMPILE=/opt/bin/${{matrix.prefix}}- make -j
74+
windows-x86-64-cross:
75+
runs-on: windows-latest
76+
strategy:
77+
matrix:
78+
include:
79+
- { sys: mingw64, base: x86_64, env: cross-mingwarm64, prefix: aarch64-w64-mingw32, compiler: gcc }
80+
# - { sys: mingw64, base: x86_64, env: cross, prefix: aarch64-w64-mingw32, compiler: clang }
81+
defaults:
82+
run:
83+
shell: msys2 {0}
84+
steps:
85+
- uses: actions/checkout@v4
86+
- uses: msys2/setup-msys2@v2
87+
with:
88+
msystem: ${{matrix.sys}}
89+
install: >
90+
mingw-w64-${{matrix.base}}-openssl
91+
mingw-w64-${{matrix.base}}-qemu
92+
make
93+
mingw-w64-${{matrix.base}}-gcc
94+
mingw-w64-${{matrix.base}}-mpfr
95+
mingw-w64-${{matrix.base}}-gmp
96+
mingw-w64-${{matrix.base}}-mpc
97+
mingw-w64-${{matrix.base}}-binutils
98+
mingw-w64-${{matrix.env}}-${{matrix.compiler}}
99+
mingw-w64-${{matrix.env}}-binutils
100+
mingw-w64-${{matrix.env}}-winpthreads
101+
- name: OS Version
102+
run: uname -s
103+
- name: configure
104+
run: cp config.mk.dist config.mk
105+
- name: make
106+
run: CC="/opt/bin/${{matrix.prefix}}-${{matrix.compiler}}.exe" HOST_CC=/${{matrix.sys}}/bin/${{matrix.compiler}} CROSS_COMPILE=/opt/bin/${{matrix.prefix}}- make -j
101107
# - name: make check
102-
# run: CC="/opt/bin/${{matrix.prefix}}-${{matrix.compiler}}.exe" CROSS_COMPILE=/opt/bin/${{matrix.prefix}}- make check -j
108+
# run: CC="/opt/bin/${{matrix.prefix}}-${{matrix.compiler}}.exe" HOST_CC=/${{matrix.sys}}/bin/${{matrix.compiler}} CROSS_COMPILE=/opt/bin/${{matrix.prefix}}- make check -j
109+
- name: make install
110+
run: CC="/opt/bin/${{matrix.prefix}}-${{matrix.compiler}}.exe" HOST_CC=/${{matrix.sys}}/bin/${{matrix.compiler}} CROSS_COMPILE=/opt/bin/${{matrix.prefix}}- make prefix=$(pwd)/install install
111+

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ includedir = $(prefix)/include
1111

1212
# Configure these in config.mk, do not make changes in this file.
1313
SUBS = math string networking fp
14-
HOST_CC = cc
14+
HOST_CC ?= cc
1515
HOST_CFLAGS = -std=c99 -O2
1616
HOST_LDFLAGS =
1717
HOST_LDLIBS =

0 commit comments

Comments
 (0)