From 7036781ce87a2abfc49f38528680300f45984e7b Mon Sep 17 00:00:00 2001
From: Jay Laura <jlaura@usgs.gov>
Date: Fri, 15 Sep 2023 14:45:58 -0700
Subject: [PATCH] Adds windows ci (#442)

* Initial tests for windows ci

* Updates for win build.

* Take 3 - windows

* Adds path stuff.

* Trying to match build machine and VS version

* Trying to match build machine and VS version

* Trying with external dependencies

* Trying to upload the build artifact (dll)

* Trying to upload the build artifact (dll)

* Updates to pin hashes and to upload all DLLs

* Attempts to upload all release artifacts.

* Attempts to upload proper build artifacts.

* Attempts syntax fix

* Trying to find ale

* ale, where are you?

* Knock, knock ale, are home?

* Maybe turn off external deps?

* Maybe recursive submodule clones will get the ale in the glass?

* Updates ale submodule to 0.9.1 release

* Update ci_testing.yml

Fixing bad merge.

* Update ci_testing.yml

Turned off docs build in the windows CI.

* Update ci_testing.yml

* Update ci_testing.yml

* Update ci_testing.yml

* Update ci_testing.yml
---
 .github/workflows/ci_testing.yml | 40 ++++++++++++++++++++++++++++++--
 ale                              |  2 +-
 2 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ci_testing.yml b/.github/workflows/ci_testing.yml
index d90c5b7..f1ac593 100644
--- a/.github/workflows/ci_testing.yml
+++ b/.github/workflows/ci_testing.yml
@@ -9,7 +9,7 @@ on:
       - main
 
 jobs:
-  Build-and-Test:
+  Build-and-Test-LinuxOsX:
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false
@@ -22,7 +22,7 @@ jobs:
     steps:
       - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
         with:
-          submodules: true
+          submodules: recursive
       - uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
         with:
           miniconda-version: "latest"
@@ -44,6 +44,42 @@ jobs:
         run: |
           cd build
           ctest -VV
+  
+  Build-and-Test-Win:
+    runs-on: windows-2019
+    strategy:
+      matrix:
+        python-version: ["3.8", "3.9", "3.10", "3.11"]
+    steps:
+      - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
+        with:
+          submodules: recursive
+          fetch-depth: 0
+      - uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
+        with:
+          miniconda-version: "latest"
+          activate-environment: usgscsm
+          environment-file: environment.yml
+          auto-activate-base: false
+          auto-update-conda: true
+          python-version: ${{ matrix.python-version }}
+      - name: Check build environment
+        run: |
+          conda list
+      - name: Build Package
+        run: |
+          mkdir -p build
+          cd build
+          cmake -G "Visual Studio 16 2019" -DUSGSCSM_BUILD_DOCS=OFF -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DUSGSCSM_BUILD_DOCS=OFF -DUSGSCSM_BUILD_TESTS=OFF .. 
+          cmake --build . --target ALL_BUILD --config Release
+      - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
+        with:
+          name: usgscsm
+          path: |
+            D:\a\usgscsm\usgscsm\build\Release\usgscsm.dll
+            D:\a\usgscsm\usgscsm\build\ale\Release\ale.dll
+            D:\a\usgscsm\usgscsm\build\Release\usgscsm_cam_test.exe
+
 
   Build-Docs:
     runs-on: ubuntu-latest
diff --git a/ale b/ale
index 04b333b..ac24185 160000
--- a/ale
+++ b/ale
@@ -1 +1 @@
-Subproject commit 04b333b16d6458e8f7957a0be92b67438a9b3584
+Subproject commit ac24185b1e89529a617210f15125ead0133e0cd5
-- 
GitLab