-
Notifications
You must be signed in to change notification settings - Fork 17
59 lines (48 loc) · 1.97 KB
/
msvc_cmake.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
name: CMake
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Download hadesmem release
run: |
Invoke-WebRequest https://github.com/namreeb/hadesmem/releases/download/v1.7.0/hadesmem-v142-Release-Win32.zip -OutFile hadesmem.zip
Expand-Archive -Path hadesmem.zip -DestinationPath .
- name: Build Boost
run: |
Invoke-WebRequest https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip -OutFile boost.zip
Expand-Archive -Path boost.zip -DestinationPath .
cd boost_1_78_0
.\bootstrap
.\b2 --with-filesystem --with-program_options link=static threading=multi runtime-link=shared architecture=x86 address-model=32 stage
- name: Configure CMake
run: cmake -A Win32 -B ${{github.workspace}}/build -DBOOST_ROOT=boost_1_78_0 -DHADESMEM_ROOT=hadesmem-v142-Release-Win32 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/artifact
- name: Build
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cmake --install ${{github.workspace}}/build
- name: Setup Artifact
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
mkdir nampower-${{ github.ref_name }}
copy artifact\* nampower-${{ github.ref_name }}\
Compress-Archive nampower-${{ github.ref_name }} nampower-${{ github.ref_name }}.zip
- name: Publish artifact
uses: actions/upload-artifact@v3
with:
name: nampower-${{ github.ref_name }}
path: ${{ github.workspace }}/nampower-${{ github.ref_name }}/*
- uses: softprops/action-gh-release@v1
name: Upload assets to release
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: nampower-${{ github.ref_name }}.zip
fail_on_unmatched_files: true