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

Initial windows CI that should build release from sources #433

Merged
merged 1 commit into from
Apr 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
name: Build
uses: ./.github/workflows/build.yml

windows-build:
name: Build on Windows
uses: ./.github/workflows/windows-build.yml
with:
name: release
options: -DCMAKE_BUILD_TYPE=Release -DENABLE_FOLLY=off -G "Visual Studio 17 2022"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does folly not work on windows?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it works but there is no conda-forge build on windows
https://github.com/conda-forge/folly-feedstock/blob/main/recipe/meta.yaml#L19

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to skip it for now, which would use std lib atomics on Windows. The Arena allocator is a bigger issue we need to solve.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone is trying to write windows build so maybe eventually they will add one
conda-forge/folly-feedstock#98


build-cuda:
name: Build
uses: ./.github/workflows/build.yml
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Reusable build action on windows
on:
workflow_call:
inputs:
name:
type: string
default: cpu
options:
type: string
default:
cuda_compiler_version:
type: string


outputs:
cache-suffix:
value: ${{ jobs.build.outputs.cache-suffix }}

jobs:
build:
name: Conda - ${{ inputs.name }}
runs-on: windows-latest

outputs:
cache-suffix: ${{ env.DATE }}

steps:
- uses: actions/checkout@v3

- name: Set env context
run: |
echo RUN_STAMP=${{ runner.os }}-${{ inputs.name }} >> $env:GITHUB_ENV
echo CONDA_ENV_PATH=$env:CONDA/envs/omnisci-dev >> $env:GITHUB_ENV
echo "DATE=$(date +'%Y%m%d')" >> $env:GITHUB_ENV
echo TMP=$env:TMP >> $env:GITHUB_ENV

- name: Get env
run: |
Get-ChildItem env:

- name: Get disk space
run: |
Get-PSDrive

- name: Restore Conda env cache
id: conda-cache
uses: actions/cache@v3
with:
path: |
${{ env.CONDA_ENV_PATH }}
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-${{ env.DATE }}
restore-keys: |
${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-

- name: Update Conda env
if: steps.conda-cache.cache-hit != 'true'
run: |
& $env:CONDA\condabin\conda.bat update conda
& $env:CONDA\condabin\conda.bat env update -f omniscidb/scripts/mapd-deps-conda-windows-env.yml

- name: Restore Maven cache
uses: actions/cache@v3
with:
path: |
~/.m2
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: maven-

- name: Conda - ${{ inputs.name }}
run: |
& $env:CONDA\condabin\conda.bat info
& $env:CONDA\condabin\conda.bat list -n omnisci-dev
& $env:CONDA\condabin\conda.bat run --no-capture-output -n omnisci-dev omniscidb\scripts\conda\build.bat ${{ inputs.options }}
Compress-Archive -Path . -DestinationPath $env:TMP\build.zip

- name: Upload build and src files
uses: actions/upload-artifact@v3
with:
name: ${{ env.RUN_STAMP }}-build
path: ${{ env.TMP }}/build.zip

- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ env.RUN_STAMP }}-logs
path: |
build/*.log
build/CMakeCache.txt
build/CMakeFiles/*.log

5 changes: 5 additions & 0 deletions omniscidb/scripts/conda/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cd %~dp0\..\..\..

cmake -B build -S . %*
cmake --build build --config Release --parallel