-
-
Notifications
You must be signed in to change notification settings - Fork 127
88 lines (79 loc) · 2.95 KB
/
ci.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
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
name: release
on:
push:
tags:
- "v*"
branches:
- "*"
jobs:
build:
name: build-windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Figure out if we're running for a tag
id: checktag
run: |
cd ${{ github.workspace }}
If($Env:GITHUB_REF -match "(?<=v)([0-9]*)\.([0-9]*)\.([0-9]*)") {
$IsRelease = "yes";
$Version = $Matches[0];
$VersionMajor = $Matches[1];
$VersionMinor = $Matches[2];
$VersionPatch = $Matches[3];
} Else {
$IsRelease = "no";
$Version = (git describe --dirty --broken --always) -replace '^v', '';
If($Version -match "([0-9]*)\.([0-9]*)\.([0-9]*)-.*") {
$VersionMajor = $Matches[1];
$VersionMinor = $Matches[2];
$VersionPatch = $Matches[3];
} Else {
$VersionMajor = 0;
$VersionMinor = 0;
$VersionPatch = 0;
}
}
Echo ("is_release=" + $IsRelease) >> $Env:GITHUB_OUTPUT;
Echo ("version=" + $Version) >> $Env:GITHUB_OUTPUT;
Echo ("version_major=" + $VersionMajor) >> $Env:GITHUB_OUTPUT;
Echo ("version_minor=" + $VersionMinor) >> $Env:GITHUB_OUTPUT;
Echo ("version_patch=" + $VersionPatch) >> $Env:GITHUB_OUTPUT;
- name: Build Algorithms
run: |
cd ${{ github.workspace }}
.\build_algorithms.ps1
- name: Build OpenHashTab
run: |
cd ${{ github.workspace }}
$Env:CI_VERSION = "${{ steps.checktag.outputs.version }}";
$Env:CI_VERSION_MAJOR = "${{ steps.checktag.outputs.version_major }}";
$Env:CI_VERSION_MINOR = "${{ steps.checktag.outputs.version_minor }}";
$Env:CI_VERSION_PATCH = "${{ steps.checktag.outputs.version_patch }}";
.\build_openhashtab.ps1
- name: Build Installer
run: |
iscc .\installer.iss -DCI_VERSION="${{ steps.checktag.outputs.version }}" -DCI_VERSION_NUMERIC="${{ steps.checktag.outputs.version_major }}.${{ steps.checktag.outputs.version_minor }}.${{ steps.checktag.outputs.version_patch }}"
- name: Upload Installer
uses: actions/upload-artifact@v4
with:
name: setup
path: |
.\OpenHashTab_setup.exe
- name: Upload Unpacked
uses: actions/upload-artifact@v4
with:
name: unpacked
path: |
.\AlgorithmsDlls\*.dll
.\AlgorithmsDlls\*.pdb
.\cmake-openhashtab-x64\OpenHashTab.dll
.\cmake-openhashtab-x64\*.exe
.\cmake-openhashtab-x64\*.pdb
.\cmake-openhashtab-ARM64\OpenHashTab.dll
.\cmake-openhashtab-ARM64\*.exe
.\cmake-openhashtab-ARM64\*.pdb