blob: 38b4452d8fd660634d53eadfa9da70c87c0629e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
From 3ea2b7adc6859e939b75c02260d9512de758eb5c Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Sat, 31 Jul 2021 18:04:05 +0200
Subject: [PATCH 124/N] CI: add a cross build job
---
.github/workflows/mingw.yml | 57 +++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index 16a96b5..af2f57c 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -149,3 +149,60 @@ jobs:
name: build-${{ matrix.msystem }}
path: _build/python.tar.zst
+ cross:
+ runs-on: ubuntu-latest
+ container:
+ image: archlinux:base-devel
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install deps
+ run: |
+ pacman --noconfirm -Suuy
+ pacman --needed --noconfirm -S mingw-w64-gcc autoconf-archive autoconf automake python zip
+
+ - name: Build
+ run: |
+ autoreconf -vfi
+
+ mkdir _build && cd _build
+
+ CFLAGS="-O2 -D_WIN32_WINNT=0x0601" \
+ ../configure \
+ --host=x86_64-w64-mingw32 \
+ --build=x86_64-pc-linux-gnu \
+ --enable-shared \
+ --with-nt-threads \
+ --with-system-expat \
+ --with-system-ffi \
+ --with-system-libmpdec \
+ --without-ensurepip \
+ --without-c-locale-coercion \
+ --enable-loadable-sqlite-extensions
+
+ make -j8
+
+ make install DESTDIR="$(pwd)/install"
+ cp /usr/x86_64-w64-mingw32/bin/libwinpthread-1.dll install/usr/local/bin
+
+ - name: 'Zip files'
+ run: |
+ zip -r install.zip _build/install
+
+ - name: Upload
+ uses: actions/upload-artifact@v2
+ with:
+ name: build-cross
+ path: install.zip
+
+ cross-test:
+ needs: [cross]
+ runs-on: windows-latest
+ steps:
+ - uses: actions/download-artifact@v2
+ with:
+ name: build-cross
+
+ - name: 'Run tests'
+ run: |
+ 7z x install.zip
+ ./_build/install/usr/local/bin/python3.exe -c "import sysconfig, pprint; pprint.pprint(sysconfig.get_config_vars())"
--
2.32.0
|