-
-
Notifications
You must be signed in to change notification settings - Fork 47
91 lines (77 loc) 路 2.49 KB
/
Copy pathbuild_windows_binaries.yml
File metadata and controls
91 lines (77 loc) 路 2.49 KB
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
name: Build Windows binaries
# Run ONLY when manually triggered from the GitHub Actions UI
on:
workflow_dispatch:
permissions:
contents: read
jobs:
windows-x64:
name: Windows x64 (MSYS2 / MinGW-w64 / GCC)
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup MSYS2 (MINGW64)
uses: msys2/setup-msys2@v2
with:
update: true
msystem: MINGW64
install: >-
base-devel
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
git
zip
unzip
- name: Get Project Version
shell: msys2 {0}
run: |
VERSION=$(grep 'PRIMECOUNT_VERSION' include/primecount.h | grep -oP '\d+\.\d+(\.\d+)?')
echo "PROJECT_VERSION=$VERSION" >> $GITHUB_ENV
- name: Build Windows x64 binary
shell: msys2 {0}
run: |
chmod +x ./scripts/build_mingw64_x64.sh
./scripts/build_mingw64_x64.sh
- name: Upload Windows x64 CI artifact
uses: actions/upload-artifact@v6
with:
name: primecount-${{ env.PROJECT_VERSION }}-win-x64
path: build-release/primecount-${{ env.PROJECT_VERSION }}-win-x64/*
if-no-files-found: error
retention-days: 7
windows-arm64:
name: Windows ARM64 (MSYS2 / Clang / ARM64)
runs-on: windows-11-arm
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup MSYS2 (CLANGARM64)
uses: msys2/setup-msys2@v2
with:
update: true
msystem: CLANGARM64
install: >-
mingw-w64-clang-aarch64-clang
mingw-w64-clang-aarch64-llvm-openmp
make
git
zip
unzip
- name: Get Project Version
shell: msys2 {0}
run: |
VERSION=$(grep 'PRIMECOUNT_VERSION' include/primecount.h | grep -oP '\d+\.\d+(\.\d+)?')
echo "PROJECT_VERSION=$VERSION" >> $GITHUB_ENV
- name: Build Windows ARM64 binary
shell: msys2 {0}
run: |
chmod +x ./scripts/build_mingw64_arm64.sh
./scripts/build_mingw64_arm64.sh
- name: Upload Windows ARM64 CI artifact
uses: actions/upload-artifact@v6
with:
name: primecount-${{ env.PROJECT_VERSION }}-win-arm64
path: build-release/primecount-${{ env.PROJECT_VERSION }}-win-arm64/*
if-no-files-found: error
retention-days: 7