-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (45 loc) · 1.9 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
name: C/C++ CI (Windows)
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout Source Tree
uses: actions/checkout@v3
- name: Setup TDM-GCC
run: |
choco install 7zip --version 22.1 -y
Invoke-WebRequest -Uri 'https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm64-2/tdm64-gcc-10.3.0-2.exe' -OutFile 'C:\Windows\temp\TDM-GCC-64.exe'
New-Item -ItemType Directory -Path 'C:\TDM-GCC-64'
Start-Process '7z' -ArgumentList 'e C:\Windows\temp\TDM-GCC-64.exe -oC:\TDM-GCC-64 -y' -Wait
Start-Process '7z' -ArgumentList 'e C:\TDM-GCC-64\*.tar.xz -oC:\TDM-GCC-64 -y' -Wait
Start-Process '7z' -ArgumentList 'x C:\TDM-GCC-64\*.tar -oC:\TDM-GCC-64 -y' -Wait
$env:PATH = 'C:\TDM-GCC-64\bin;' + $env:PATH
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
- name: Setup folder directories
run: |
mkdir build
mkdir build\x86
mkdir build\x64
- name: Build xpmgr (x86)
run: |
windres icon.rc -O coff -F pe-i386 -o build\x86\icon_x86.res -v
C:\TDM-GCC-64\bin\g++.exe -m32 -o build\x86\xpmgr_x86 xpmgr.cpp build\x86\icon_x86.res -lole32 -luuid -loleaut32 -v
- name: Build xpmgr (x64)
run: |
windres icon.rc -O coff -o build\x64\icon_x64.res -v
C:\TDM-GCC-64\bin\g++.exe -o build\x64\xpmgr_x64 xpmgr.cpp build\x64\icon_x64.res -lole32 -luuid -loleaut32 -v
- name: Upload build artifact (x86)
uses: actions/upload-artifact@v3.1.2
with:
name: xpmgr (x86)
path: .\build\x86
- name: Upload build artifact (x64)
uses: actions/upload-artifact@v3.1.2
with:
name: xpmgr (x64)
path: .\build\x64