Skip to content

Commit c375a76

Browse files
authored
Move MinGW to Github actions (lsh123#302)
1 parent fcf5f79 commit c375a76

File tree

3 files changed

+110
-57
lines changed

3 files changed

+110
-57
lines changed

.github/workflows/make-check.yml

Lines changed: 96 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: C/C++ CI
1+
name: Make Check
22

33
on:
44
push:
@@ -7,39 +7,111 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
build:
11-
12-
runs-on: ${{ matrix.os }}
10+
check-ubuntu:
11+
runs-on: ubuntu-latest
1312
strategy:
13+
fail-fast: false
1414
matrix:
15-
os: [ubuntu-latest, macos-latest]
1615
include:
17-
- os: ubuntu-latest
18-
BUILD_TOOLS_INSTALL: sudo apt install automake autoconf libtool libtool-bin libltdl-dev libltdl7
19-
LIBXML2_INSTALL: sudo apt install libxml2 libxml2-dev libxslt1.1 libxslt1-dev
20-
CRYPTO_LIBS_INSTALL: sudo apt install libssl1.0.0 libssl-dev libnspr4 libnspr4-dev libnss3 libnss3-dev libnss3-tools libgcrypt20 libgcrypt20-dev libgnutls28-dev
21-
- os: macos-latest
22-
BUILD_TOOLS_INSTALL: brew install automake autoconf libtool
23-
LIBXML2_INSTALL: brew install libxml2 libxslt
24-
CRYPTO_LIBS_INSTALL: brew install openssl libgcrypt gnutls
25-
16+
- static_linking: true
17+
- static_linking: false
2618
steps:
19+
- name: install dependencies
20+
run: |
21+
sudo apt update
22+
sudo apt install automake autoconf libtool libtool-bin libltdl-dev libltdl7
23+
sudo apt install libxml2 libxml2-dev libxslt1.1 libxslt1-dev
24+
sudo apt install libssl1.0.0 libssl-dev libnspr4 libnspr4-dev libnss3 libnss3-dev libnss3-tools libgcrypt20 libgcrypt20-dev libgnutls28-dev
2725
- uses: actions/checkout@v2
28-
- name: install build tools
29-
run: ${{matrix.BUILD_TOOLS_INSTALL}}
30-
- name: install libxml2/libxslt
31-
run: ${{matrix.LIBXML2_INSTALL}}
32-
- name: install crypto libs
33-
run: ${{matrix.CRYPTO_LIBS_INSTALL}}
34-
- name: mkdir build
35-
run: mkdir build
26+
- run: mkdir build
3627
- name: configure
3728
working-directory: build
38-
run: ../autogen.sh --enable-werror
29+
run: ../autogen.sh --enable-werror --enable-static-linking=${{ matrix.static_linking }}
30+
- name: make
31+
working-directory: build
32+
run: make
33+
- name: make check
34+
working-directory: build
35+
run: make check
36+
37+
check-osx:
38+
runs-on: macos-latest
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
include:
43+
- static_linking: true
44+
- static_linking: false
45+
steps:
46+
- name: install dependencies
47+
# nss is disabled for now
48+
run: |
49+
brew update
50+
brew install automake autoconf libtool
51+
brew install libxml2 libxslt
52+
brew install openssl libgcrypt gnutls
53+
- uses: actions/checkout@v2
54+
- run: mkdir build
55+
- name: configure
56+
working-directory: build
57+
run: ../autogen.sh --enable-werror --enable-static-linking=${{ matrix.static_linking }}
58+
- name: make
59+
working-directory: build
60+
run: make
61+
- name: make check
62+
working-directory: build
63+
run: make check
64+
65+
check-mingw:
66+
runs-on: windows-latest
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
include:
71+
- msystem: MINGW64
72+
arch: x86_64
73+
unicode: true
74+
static_linking: true
75+
- msystem: MINGW64
76+
arch: x86_64
77+
unicode: true
78+
static_linking: false
79+
- msystem: MINGW64
80+
arch: x86_64
81+
unicode: false
82+
static_linking: true
83+
- msystem: MINGW64
84+
arch: x86_64
85+
unicode: false
86+
static_linking: false
87+
defaults:
88+
run:
89+
shell: msys2 {0}
90+
steps:
91+
- uses: msys2/setup-msys2@v2
92+
with:
93+
msystem: ${{ matrix.msystem }}
94+
release: false
95+
update: false
96+
install: >-
97+
git
98+
base-devel
99+
mingw-w64-${{ matrix.arch }}-toolchain
100+
mingw-w64-${{ matrix.arch }}-libtool
101+
mingw-w64-${{ matrix.arch }}-libxml2
102+
mingw-w64-${{ matrix.arch }}-libxslt
103+
mingw-w64-${{ matrix.arch }}-openssl
104+
mingw-w64-${{ matrix.arch }}-gnutls
105+
- run: git config --global core.autocrlf input
106+
shell: bash
107+
- uses: actions/checkout@v2
108+
- run: mkdir build
109+
- name: configure
110+
working-directory: build
111+
run: pwd && ../autogen.sh --build="${{ matrix.arch }}-w64-mingw32" --host="${{ matrix.arch }}-w64-mingw32" --enable-unicode=${{ matrix.unicode }} --enable-static-linking=${{ matrix.static_linking }} --enable-mscrypto --enable-mscng
39112
- name: make
40113
working-directory: build
41114
run: make
42115
- name: make check
43116
working-directory: build
44117
run: make check
45-

appveyor.yml

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -64,43 +64,25 @@ environment:
6464
UNICODE: no
6565
WERROR: yes
6666

67-
- COMPILER: MinGW-w64
68-
STATIC: no
69-
UNICODE: yes
70-
71-
- COMPILER: MinGW-w64
72-
STATIC: yes
73-
UNICODE: no
74-
7567
init:
7668
- git config --global core.autocrlf input
77-
- if [%COMPILER%]==[MinGW-w64] set PATH=C:\msys64\usr\bin;C:\msys64\mingw64\bin;%PATH%
78-
- if [%COMPILER%]==[MSVC17] set PATH=%EXTRAS_FOLDER%\bin;%EXTRAS_FOLDER%\lib;;%PATH%
69+
- set PATH=%EXTRAS_FOLDER%\bin;%EXTRAS_FOLDER%\lib;;%PATH%
7970

8071
install:
81-
- if [%COMPILER%]==[MinGW-w64] pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade
82-
- if [%COMPILER%]==[MinGW-w64] pacman -S --noconfirm --needed mingw-w64-x86_64-{toolchain,libtool}
83-
- if [%COMPILER%]==[MinGW-w64] pacman -S --noconfirm --needed mingw-w64-x86_64-{libxml2,libxslt,openssl,gnutls}
84-
- if [%COMPILER%]==[MSVC17] call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
85-
- if [%COMPILER%]==[MSVC17] mkdir %EXTRAS_FOLDER% && cd %EXTRAS_FOLDER%
86-
- if [%COMPILER%]==[MSVC17] appveyor DownloadFile %EXTRAS_URL%/%LIBXML2_FILE%
87-
- if [%COMPILER%]==[MSVC17] 7z x %LIBXML2_FILE%
88-
- if [%COMPILER%]==[MSVC17] appveyor DownloadFile %EXTRAS_URL%/%LIBXSLT_FILE%
89-
- if [%COMPILER%]==[MSVC17] 7z x %LIBXSLT_FILE%
90-
- if [%COMPILER%]==[MSVC17] appveyor DownloadFile %EXTRAS_URL%/%OPENSSL_FILE%
91-
- if [%COMPILER%]==[MSVC17] 7z x %OPENSSL_FILE%
92-
- if [%COMPILER%]==[MSVC17] cd %APPVEYOR_BUILD_FOLDER%
72+
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
73+
- mkdir %EXTRAS_FOLDER% && cd %EXTRAS_FOLDER%
74+
- appveyor DownloadFile %EXTRAS_URL%/%LIBXML2_FILE%
75+
- 7z x %LIBXML2_FILE%
76+
- appveyor DownloadFile %EXTRAS_URL%/%LIBXSLT_FILE%
77+
- 7z x %LIBXSLT_FILE%
78+
- appveyor DownloadFile %EXTRAS_URL%/%OPENSSL_FILE%
79+
- 7z x %OPENSSL_FILE%
80+
- cd %APPVEYOR_BUILD_FOLDER%
9381

9482
build_script:
95-
- if [%COMPILER%]==[MinGW-w64] mkdir build && cd build
96-
- if [%COMPILER%]==[MinGW-w64] bash ../autogen.sh --build="x86_64-w64-mingw32" --host="x86_64-w64-mingw32" --enable-unicode=$UNICODE --enable-mscrypto --enable-mscng --enable-openssl --enable-gnutls --enable-static-linking=$STATIC
97-
- if [%COMPILER%]==[MinGW-w64] make
98-
- if [%COMPILER%]==[MSVC17] cd win32
99-
- if [%COMPILER%]==[MSVC17] cscript configure.js static=%STATIC% crypto=%CRYPTO% werror=%WERROR% iconv=no unicode=%UNICODE% prefix=%EXTRAS_FOLDER% include=%EXTRAS_FOLDER%\include;%EXTRAS_FOLDER%\include\libxml2;%MSSDK_INCLUDE% lib=%EXTRAS_FOLDER%\bin;%EXTRAS_FOLDER%\lib;%MSSDK_LIB%
100-
- if [%COMPILER%]==[MSVC17] nmake
83+
- cd win32
84+
- cscript configure.js static=%STATIC% crypto=%CRYPTO% werror=%WERROR% iconv=no unicode=%UNICODE% prefix=%EXTRAS_FOLDER% include=%EXTRAS_FOLDER%\include;%EXTRAS_FOLDER%\include\libxml2;%MSSDK_INCLUDE% lib=%EXTRAS_FOLDER%\bin;%EXTRAS_FOLDER%\lib;%MSSDK_LIB%
85+
- nmake
10186

10287
test_script:
103-
- if [%COMPILER%]==[MinGW-w64] make check
104-
- if [%COMPILER%]==[MSVC17] nmake check
105-
106-
88+
- nmake check

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2440,7 +2440,6 @@ apps/Makefile
24402440
docs/Makefile
24412441
docs/api/Makefile
24422442
man/Makefile
2443-
24442443
xmlsec1-openssl.pc:xmlsec-openssl.pc.in
24452444
xmlsec1-gnutls.pc:xmlsec-gnutls.pc.in
24462445
xmlsec1-gcrypt.pc:xmlsec-gcrypt.pc.in

0 commit comments

Comments
 (0)