-
Notifications
You must be signed in to change notification settings - Fork 4
193 lines (159 loc) · 6.15 KB
/
build.yaml
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
name: Build
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
jobs:
test_push_to_gitlab:
strategy:
fail-fast: true
runs-on: windows-latest
steps:
- name: Setup ssh-agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
- name: Push test file to gitlab
shell: bash
run: |
echo 'gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=' >> ~/.ssh/known_hosts
git config --global user.email '[email protected]'
git config --global user.name 'openmw-deps-build'
git config --global user.signkey 8D5838140D294CE3C17ED6AE31FC2142D139BD97
env GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]:elsid/openmw-deps.git
cd openmw-deps
echo ${{ github.sha }} > test.txt
git checkout -b test-${{ github.sha }}
git lfs track test.txt
git add test.txt
git commit -m 'Add test.txt at ${{ github.sha }}'
git push origin test-${{ github.sha }}
static:
if: false
strategy:
fail-fast: true
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- working-directory: 'C:/vcpkg'
run: git remote add openmw https://github.com/elsid/vcpkg.git
- working-directory: 'C:/vcpkg'
run: git fetch openmw
- working-directory: 'C:/vcpkg'
run: git checkout 6c3e3f54ffc27cc47ee1b3233dfcac2363c9fe62
- working-directory: 'C:/vcpkg'
run: ./bootstrap-vcpkg.bat -disableMetrics
- name: Install vcpkg packages
run: >
vcpkg install --triplet x64-windows-static
boost-geometry
boost-iostreams
boost-locale
boost-program-options
bullet3[double-precision,multithreading]
ffmpeg
freetype
icu
luajit
lz4
mygui
openal-soft
openmw-osg
sdl2
- name: Export installed vcpkg packages
run: >
vcpkg export
--x-all-installed
--7zip
--output-dir ${{ github.workspace }}
--output openmw-deps-vcpkg-x64-windows-static-${{ github.sha }}
- name: Store exported vcpkg packages
uses: actions/upload-artifact@v4
with:
name: openmw-deps-vcpkg-x64-windows-static-${{ github.sha }}
path: ${{ github.workspace }}/openmw-deps-vcpkg-x64-windows-static-${{ github.sha }}.7z
# - name: Push exported vcpkg package to gitlab
# shell: bash
# run: |
# env GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]:elsid/openmw-deps.git
# cd openmw-deps
# mv ${{ github.workspace }}/openmw-deps-vcpkg-x64-windows-static-${{ github.sha }}.7z openmw-deps-vcpkg-x64-windows-static-${{ github.sha }}.7z
# git checkout -b openmw-deps-vcpkg-x64-windows-static-${{ github.sha }}
# git lfs track openmw-deps-vcpkg-x64-windows-static-${{ github.sha }}.7z
# git add openmw-deps-vcpkg-x64-windows-static-${{ github.sha }}.7z
# git commit -m 'Add openmw-deps-vcpkg-x64-windows-static-${{ github.sha }}.7z'
# git push origin openmw-deps-vcpkg-x64-windows-static-${{ github.sha }}
dynamic:
if: false
strategy:
fail-fast: true
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- working-directory: 'C:/vcpkg'
run: git remote add openmw https://github.com/elsid/vcpkg.git
- working-directory: 'C:/vcpkg'
run: git fetch openmw
- working-directory: 'C:/vcpkg'
run: git checkout 6c3e3f54ffc27cc47ee1b3233dfcac2363c9fe62
- working-directory: 'C:/vcpkg'
run: ./bootstrap-vcpkg.bat -disableMetrics
- name: Install vcpkg packages
run: >
vcpkg install --triplet x64-windows
boost-geometry
boost-iostreams
boost-locale
boost-program-options
bullet3[double-precision,multithreading]
ffmpeg
freetype
icu
luajit
lz4
mygui
openal-soft
openmw-osg
sdl2
- name: Export installed vcpkg packages
run: >
vcpkg export
--x-all-installed
--7zip
--output-dir ${{ github.workspace }}
--output openmw-deps-vcpkg-x64-windows-${{ github.sha }}
- name: Store exported vcpkg packages
uses: actions/upload-artifact@v4
with:
name: openmw-deps-vcpkg-x64-windows-${{ github.sha }}
path: ${{ github.workspace }}/openmw-deps-vcpkg-x64-windows-${{ github.sha }}.7z
- name: Push exported vcpkg package to gitlab
shell: bash
run: |
env GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]:elsid/openmw-deps.git
cd openmw-deps
mv ${{ github.workspace }}/openmw-deps-vcpkg-x64-windows-${{ github.sha }}.7z openmw-deps-vcpkg-x64-windows-${{ github.sha }}.7z
git checkout -b openmw-deps-vcpkg-x64-windows-${{ github.sha }}
git lfs track openmw-deps-vcpkg-x64-windows-${{ github.sha }}.7z
git add openmw-deps-vcpkg-x64-windows-${{ github.sha }}.7z
git commit -m 'Add openmw-deps-vcpkg-x64-windows-${{ github.sha }}.7z'
git push origin openmw-deps-vcpkg-x64-windows-${{ github.sha }}