-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (70 loc) · 1.98 KB
/
msys2.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
name: MSYS2
on: push
jobs:
msys2_mingw64:
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: >-
git
mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
mingw-w64-x86_64-make
mingw-w64-x86_64-ninja
- name: Build
run: |
export MSYSTEM=MINGW64
export CXX=g++
export CC=gcc
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake ../
cmake --build . -j2
- name: Run tests
run: |
export MSYSTEM=MINGW64
cd "$GITHUB_WORKSPACE/build"
ctest -V
- name: Build statically linked
run: |
export MSYSTEM=MINGW64
export CXX=g++
export CC=gcc
cd $GITHUB_WORKSPACE
mkdir build-static
cd build-static
cmake -DENABLE_LTO=ON -DENABLE_STATIC_LINKING=ON ../
cmake --build . -j2
- name: Collect files
run: |
export MSYSTEM=MINGW64
mkdir -p "$GITHUB_WORKSPACE"/artifacts
cd "$GITHUB_WORKSPACE"
cp build-static/sha256/sha256.exe artifacts/
cp ReadMe.de.txt artifacts/
cp ReadMe.en.txt artifacts/
cp ChangeLog.md artifacts/
cp LICENSE artifacts/
cp third-party.md artifacts/
VERSION=$(git describe --always)
mv artifacts sha256_$VERSION
'/c/Program Files/7-Zip/7z.exe' a -r sha256_${VERSION}_win64.zip sha256_$VERSION
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sha256_win64
if-no-files-found: error
path: |
sha256_*_win64.zip