-
Notifications
You must be signed in to change notification settings - Fork 3
85 lines (83 loc) · 3.13 KB
/
Windows.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
name: Windows PThreads & mmap
on:
workflow_dispatch:
inputs:
version:
description: 'What version of PThreads to compile and commit to repo?'
required: true
default: 3.0.0
type: number
hash:
description: 'What is the hash to the source version?'
required: true
default: 07053a521b0a9deb6db2a649cde1f828f2eb1f4f
type: string
jobs:
windows:
runs-on: windows-${{ matrix.config.server }}
continue-on-error: true
name: windows-${{ matrix.config.toolchain}}-${{ matrix.config.arch}}
env:
VERSION: ${{ github.event.inputs.version }}
HASH: ${{ github.event.inputs.hash }}
strategy:
fail-fast: false
matrix:
config:
- {toolchain: Visual Studio 16 2019, arch: x64, server: 2019}
steps:
- uses: actions/checkout@v3
- name: Envinfo
run: npx envinfo
- name: Build Windows pthreads
shell: cmd
run: |
curl -L https://cytranet.dl.sourceforge.net/project/pthreads4w/pthreads4w-code-v${{ env.VERSION }}.zip --output pthreads4w-code.zip
unzip -xoq pthreads4w-code.zip
mkdir pthreads4w-code-${{ env.HASH }}\cmake
copy /Y .github\pthread\cmake\*.* pthreads4w-code-${{ env.HASH }}\cmake
copy /Y .github\pthread\CMakeLists.txt pthreads4w-code-${{ env.HASH }}
copy /Y .github\pthread\pthread.cxx pthreads4w-code-${{ env.HASH }}
cd pthreads4w-code-${{ env.HASH }}
mkdir build
cd build
cmake .. -D BUILD_TESTING=OFF -G "${{ matrix.config.toolchain }}" -A ${{ matrix.config.arch }} -D CMAKE_BUILD_TYPE=Release
cmake --build . --config Release --target install
dir ..\PTHREADS-BUILT\bin
dir ..\PTHREADS-BUILT\include
dir ..\PTHREADS-BUILT\lib
env:
VERSION: ${{ github.event.inputs.version }}
HASH: ${{ github.event.inputs.hash }}
- name: Build Windows mmap
shell: cmd
run: |
mkdir windows_mmap
copy /Y .github\mmap\*.* windows_mmap
cd windows_mmap
mkdir build
cd build
cmake ..
cmake --build . --config Release
dir Release
- name: Upload/Commit to Repo
shell: cmd
run: |
git pull
git config user.name github-actions
git config user.email [email protected]
mkdir lib\Windows
mkdir headers\original
copy /Y pthreads4w-code-${{ env.HASH }}\PTHREADS-BUILT\include\*.h headers\original\
copy /Y pthreads4w-code-${{ env.HASH }}\implement.h headers\original\
git add headers
git commit -m "Windows pthreads *.h headers"
git push -q
copy /Y pthreads4w-code-${{ env.HASH }}\PTHREADS-BUILT\bin\pthreadV*.dll lib\Windows\
git add lib
git commit -m "created pthreadVC3.dll, pthreadVCE3.dll, pthreadVSE3.dll - for Windows x86_64"
git push -q
copy /Y windows_mmap\build\Release\mman.dll lib\Windows\
git add lib
git commit -m "created mman.dll - for Windows x86_64"
git push -q