Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 81ac5b3

Browse files
gshimanskyalexbaden
authored andcommitted
Initial windows CI that should build release from sources
Signed-off-by: Gregory Shimansky <[email protected]>
1 parent 85dd6e0 commit 81ac5b3

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ jobs:
1717
name: Build
1818
uses: ./.github/workflows/build.yml
1919

20+
windows-build:
21+
name: Build on Windows
22+
uses: ./.github/workflows/windows-build.yml
23+
with:
24+
name: release
25+
options: -DCMAKE_BUILD_TYPE=Release -DENABLE_FOLLY=off -G "Visual Studio 17 2022"
26+
2027
build-cuda:
2128
name: Build
2229
uses: ./.github/workflows/build.yml
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Reusable build action on windows
2+
on:
3+
workflow_call:
4+
inputs:
5+
name:
6+
type: string
7+
default: cpu
8+
options:
9+
type: string
10+
default:
11+
cuda_compiler_version:
12+
type: string
13+
14+
15+
outputs:
16+
cache-suffix:
17+
value: ${{ jobs.build.outputs.cache-suffix }}
18+
19+
jobs:
20+
build:
21+
name: Conda - ${{ inputs.name }}
22+
runs-on: windows-latest
23+
24+
outputs:
25+
cache-suffix: ${{ env.DATE }}
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
30+
- name: Set env context
31+
run: |
32+
echo RUN_STAMP=${{ runner.os }}-${{ inputs.name }} >> $env:GITHUB_ENV
33+
echo CONDA_ENV_PATH=$env:CONDA/envs/omnisci-dev >> $env:GITHUB_ENV
34+
echo "DATE=$(date +'%Y%m%d')" >> $env:GITHUB_ENV
35+
echo TMP=$env:TMP >> $env:GITHUB_ENV
36+
37+
- name: Get env
38+
run: |
39+
Get-ChildItem env:
40+
41+
- name: Get disk space
42+
run: |
43+
Get-PSDrive
44+
45+
- name: Restore Conda env cache
46+
id: conda-cache
47+
uses: actions/cache@v3
48+
with:
49+
path: |
50+
${{ env.CONDA_ENV_PATH }}
51+
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-${{ env.DATE }}
52+
restore-keys: |
53+
${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-
54+
55+
- name: Update Conda env
56+
if: steps.conda-cache.cache-hit != 'true'
57+
run: |
58+
& $env:CONDA\condabin\conda.bat update conda
59+
& $env:CONDA\condabin\conda.bat env update -f omniscidb/scripts/mapd-deps-conda-windows-env.yml
60+
61+
- name: Restore Maven cache
62+
uses: actions/cache@v3
63+
with:
64+
path: |
65+
~/.m2
66+
key: maven-${{ hashFiles('**/pom.xml') }}
67+
restore-keys: maven-
68+
69+
- name: Conda - ${{ inputs.name }}
70+
run: |
71+
& $env:CONDA\condabin\conda.bat info
72+
& $env:CONDA\condabin\conda.bat list -n omnisci-dev
73+
& $env:CONDA\condabin\conda.bat run --no-capture-output -n omnisci-dev omniscidb\scripts\conda\build.bat ${{ inputs.options }}
74+
Compress-Archive -Path . -DestinationPath $env:TMP\build.zip
75+
76+
- name: Upload build and src files
77+
uses: actions/upload-artifact@v3
78+
with:
79+
name: ${{ env.RUN_STAMP }}-build
80+
path: ${{ env.TMP }}/build.zip
81+
82+
- name: Upload logs
83+
if: always()
84+
uses: actions/upload-artifact@v3
85+
with:
86+
name: ${{ env.RUN_STAMP }}-logs
87+
path: |
88+
build/*.log
89+
build/CMakeCache.txt
90+
build/CMakeFiles/*.log
91+

omniscidb/scripts/conda/build.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cd %~dp0\..\..\..
2+
3+
cmake -B build -S . %*
4+
cmake --build build --config Release --parallel
5+

0 commit comments

Comments
 (0)