-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (48 loc) · 1.65 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
# Build and push artifacts
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-push:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install LLVM
run: choco install -y llvm --version=16.0.6
- name: Install Ninja
run: choco install -y ninja
- name: Download protobuf
run: |
Invoke-WebRequest "https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-win64.zip" -OutFile protoc_x64-windows.zip
dir
mkdir protoc_x64-windows
7z x protobuf_x64-windows.zip -oprotoc_x64-windows
dir
Invoke-WebRequest "https://www.dropbox.com/scl/fi/te9p80zrzcwgswrkw21en/protobuf_x64-windows.zip?rlkey=btmzjokhh256xxns348o3re7m&dl=1" -OutFile protobuf_x64-windows.zip
dir
7z x protobuf_x64-windows.zip
dir
- name: CMake generate
shell: bash
env:
ARTIFACT_NAME: ppc2cpp-${{ runner.os }}
run: |
cmake --version
cmake -B build -GNinja \
-DCMAKE_INSTALL_PREFIX=$ARTIFACT_NAME \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DEXTERNAL_LIBPROTOBUF_PATH=protobuf_x64-windows \
-DEXTERNAL_PROTOC_PATH=protoc_x64-windows \
- name: Build
shell: bash
run: cmake --build build --target install --parallel
- uses: actions/upload-artifact@v3
if: github.ref == 'refs/heads/main' && github.repository == 'em-eight/ppc2cpp'
with:
name: ppc2cpp-${{ runner.os }}
path: ppc2cpp-${{ runner.os }}