From bf86bf277535ca11cef5439eba00832a4ff09923 Mon Sep 17 00:00:00 2001
From: acpaquette <acpaquette@usgs.gov>
Date: Wed, 5 Jul 2023 15:35:50 -0700
Subject: [PATCH] ALE Windows CI (#548)

* Adds ALE windows builds

* Clamped scipy to 1.10

* Converted checkout/miniconda uses from versions to hashes

* Added ale.lib to artifacts to upload
---
 .github/workflows/ci_testing.yml | 40 +++++++++++++++++++++++++++++---
 environment.yml                  |  2 +-
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci_testing.yml b/.github/workflows/ci_testing.yml
index 5ade084..713e3ef 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
@@ -20,10 +20,10 @@ jobs:
       run:
         shell: bash -l {0}
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
         with:
           submodules: true
-      - uses: conda-incubator/setup-miniconda@v2
+      - uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
         with:
           miniconda-version: "latest"
           activate-environment: ale
@@ -57,3 +57,37 @@ jobs:
           fail_ci_if_error: true
           verbose: true
         if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
+
+  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
+      - uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
+        with:
+          miniconda-version: "latest"
+          activate-environment: ale
+          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 -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -G "Visual Studio 16 2019" -A x64 -DALE_BUILD_TESTS=OFF ..
+          cmake --build . --target ALL_BUILD --config Release
+          ls D:\a\ale\ale\build\Release
+      - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
+        with:
+          name: ale
+          path: |
+            D:\a\ale\ale\build\Release\ale.dll
+            D:\a\ale\ale\build\Release\ale.lib
\ No newline at end of file
diff --git a/environment.yml b/environment.yml
index b4c1110..9d5ee15 100644
--- a/environment.yml
+++ b/environment.yml
@@ -15,7 +15,7 @@ dependencies:
   - pytz
   - python
   - python-dateutil
-  - scipy>=1.4.0
+  - scipy>=1.4.0,<1.11
   - spiceypy>=5.1.0
   - pyyaml
   - pytest
-- 
GitLab