-
Notifications
You must be signed in to change notification settings - Fork 88
49 lines (48 loc) · 1.52 KB
/
build.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
name: Koolo Build CI
on:
push:
pull_request:
release:
jobs:
build:
name: "Build Koolo binary"
runs-on: windows-2022
steps:
# Remove this once Windows image get fixed
- name: Remove Strawberry Perl from PATH
run: |
$env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", ""
"PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
rm C:\mingw64 -force -r
- name: "Install CMake"
run: |
choco install -y --force cmake 7zip.install wget
- name: "Install MinGW"
run: |
wget -nv https://download.qt.io/development_releases/prebuilt/mingw_64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z
7z x -aoa -oC: x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z
"C:\mingw64\bin" >> $env:GITHUB_PATH
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Go"
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: "Prepare env"
run: mkdir C:\go\pkg
- name: "Building OpenCV"
continue-on-error: true
env:
GOPATH: C:\go
run: .\prepare_env.bat
- name: "Building Koolo artifacts"
env:
GOPATH: C:\go
run: .\build.bat
- name: "Packing the release"
run: 7z a -tzip koolo_${{ github.ref_name }}.zip .\build\*
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: koolo_${{ github.ref_name }}.zip