-
Notifications
You must be signed in to change notification settings - Fork 210
126 lines (114 loc) · 3.47 KB
/
main.yml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: GitHub Actions
on: [push, pull_request]
jobs:
host-x86:
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [x86_64]
cxx_compiler: [g++-10, clang++-11]
steps:
- name: checkout code
uses: actions/checkout@v4
- name: build artifact
env:
CXX: ${{ matrix.cxx_compiler }}
run: |
sh .ci/cross-tool.sh
make check
sh .ci/cross-check.sh
host-win:
runs-on: windows-2022
strategy:
matrix:
arch:
- x86_64
- armv7
- aarch64
env:
LLVM_MINGW_URL: https://github.com/mstorsjo/llvm-mingw/releases/download/20220906/llvm-mingw-20220906-ucrt-x86_64.zip
defaults:
run:
shell: bash
steps:
- name: unpack llvm-mingw
run: |
curl -L -O $LLVM_MINGW_URL
unzip -q llvm-mingw-*.zip
rm llvm-mingw-*.zip
mv llvm-mingw-* "$HOME/llvm-mingw"
echo "$HOME/llvm-mingw/bin" >> $GITHUB_PATH
- name: checkout code
uses: actions/checkout@v4
- name: build artifact
env:
CXX: ${{ matrix.arch }}-w64-mingw32-clang++
run: mingw32-make processor=${{ matrix.arch }}
- name: run tests
if: matrix.arch == 'x86_64'
run: mingw32-make check
host-arm:
runs-on: ubuntu-20.04
strategy:
matrix:
arch_with_features: [
{arch: armv7, feature: none, arch_cflags: none},
{arch: aarch64, feature: none, arch_cflags: none},
{arch: aarch64, feature: crypto+crc, arch_cflags: none},
{arch: armv7, feature: none, arch_cflags: '-mcpu=cortex-a32 -mfpu=neon-fp-armv8'}
]
cxx_compiler: [g++-10, clang++-11]
steps:
- name: checkout code
uses: actions/checkout@v4
- name: build artifact
# The Github Action for non-x86 CPU
# https://github.com/uraimo/run-on-arch-action
uses: uraimo/run-on-arch-action@v2.6.0
with:
arch: ${{ matrix.arch_with_features.arch }}
distro: ubuntu20.04
env: |
CXX: ${{ matrix.cxx_compiler }}
ARCH_CFLAGS: ${{ matrix.arch_with_features.arch_cflags }}
install: |
apt-get update -q -y
apt-get install -q -y "${{ matrix.cxx_compiler }}" make
apt-get install -q -y gcc
run: |
make FEATURE=${{ matrix.arch_with_features.feature }} check
host-win-msvc:
runs-on: windows-2022
steps:
- name: checkout code
uses: actions/checkout@v4
- name: add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: build artifact
run: msbuild sse2neon.vcxproj -t:rebuild -property:Configuration=Release -property:Platform=ARM64
- name: upload artifact
uses: actions/upload-artifact@master
with:
name: msvc-arm64-artifact
path: ARM64
test-win-msvc:
runs-on: ubuntu-latest
container: linaro/wine-arm64
needs: host-win-msvc
steps:
- name: download artifact
uses: actions/download-artifact@master
with:
name: msvc-arm64-artifact
- name: Run tests
run: wine-arm64 cmd.exe /c 'Release\sse2neon.exe'
coding-style:
runs-on: ubuntu-20.04
steps:
- name: checkout code
uses: actions/checkout@v4
- name: style check
run: |
sudo apt-get install -q -y clang-format-12
sh .ci/check-format.sh
shell: bash