Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci Runners for Mac Intel & Windows #1162

Merged
merged 37 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a52d40c
add mac intel and try windows runner
dguittet May 6, 2024
dbdeabd
windows build
dguittet May 6, 2024
4253ae5
windows ci
dguittet May 6, 2024
900f359
windows ci
dguittet May 6, 2024
b044226
windows ci
dguittet May 6, 2024
f4452dc
windows ci
dguittet May 6, 2024
ce50f0b
windows ci
dguittet May 6, 2024
3060a2e
windows ci
dguittet May 6, 2024
f266b91
windows ci
dguittet May 6, 2024
e66bcfa
windows ci
dguittet May 6, 2024
255f215
windows ci
dguittet May 6, 2024
fd91767
windows ci
dguittet May 6, 2024
b243ced
Update ci.yml
dguittet May 6, 2024
46214d9
Update ci.yml
dguittet May 6, 2024
4758077
Update ci.yml
dguittet May 6, 2024
b5535d9
Update ci.yml
dguittet May 6, 2024
68ee2a5
Update ci.yml
dguittet May 7, 2024
372f954
Update ci.yml
dguittet May 7, 2024
b7a7e30
Update ci.yml
dguittet May 7, 2024
cb33476
Update ci.yml
dguittet May 7, 2024
420b10a
Update ci.yml
dguittet May 7, 2024
5e65487
Update ci.yml
dguittet May 7, 2024
4da9e5b
Update ci.yml
dguittet May 7, 2024
58780bb
Update ci.yml
dguittet May 7, 2024
edaf4b3
Update ci.yml
dguittet May 7, 2024
6bfbf88
Update ci.yml
dguittet May 7, 2024
851b1da
Update ci.yml
dguittet May 7, 2024
e29a0a0
Update ci.yml
dguittet May 7, 2024
07a98bd
Update ci.yml
dguittet May 7, 2024
ee3e396
Update ci.yml
dguittet May 7, 2024
4e785ad
Update ci.yml
dguittet May 8, 2024
f320c7a
fix deprecation warnings in ci.yml
dguittet May 8, 2024
22743a2
Merge branch 'ci_runners' of https://github.com/nrel/ssc into ci_runners
dguittet May 8, 2024
c056e08
Update ci.yml
dguittet May 8, 2024
c2121ed
Update ci.yml
dguittet May 8, 2024
34b68fa
Update ci.yml
dguittet May 8, 2024
6666f82
python avail check for windbosse
dguittet May 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
92 changes: 85 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.12
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.24.x'
- name: Test cmake version
Expand Down Expand Up @@ -68,19 +68,22 @@ jobs:
${SSCDIR}/build/test/Test

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: SSC Linux Shared Libraries
path: |
${{env.SSCDIR}}/build/ssc/libssc.so
${{env.SSCDIR}}/build/ssc/ssc.so

build-on-mac:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14-large, macos-latest]

steps:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.12
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.24.x'
- name: Test cmake version
Expand Down Expand Up @@ -124,7 +127,7 @@ jobs:
# Build your program with the given configuration
run: |
cd ${SSCDIR}/build
make -j4
make -j3

- name: Test
# Turn off fast fail for when the landbosse tests write to cerr
Expand All @@ -134,10 +137,85 @@ jobs:
shell: bash

- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v4
with:
name: SSC Mac Arm Shared Libraries
path: |
${{env.SSCDIR}}/build/ssc/libssc.dylib
${{env.SSCDIR}}/build/ssc/ssc.dylib

- name: Upload Artifacts
if: ${{ matrix.os != 'macos-latest' }}
uses: actions/upload-artifact@v4
with:
name: SSC Mac Shared Libraries
name: SSC Mac Intel Shared Libraries
path: |
${{env.SSCDIR}}/build/ssc/libssc.dylib
${{env.SSCDIR}}/build/ssc/ssc.dylib

build-on-windows:
runs-on: windows-2019

steps:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.12
with:
cmake-version: '3.24.x'
- name: Test cmake version
run: cmake --version

- name: Set relative paths
shell: bash
run: |
GTEST=$GITHUB_WORKSPACE/googletest
echo "GTEST=$GTEST" >> $GITHUB_ENV
SSCDIR=$GITHUB_WORKSPACE/ssc
echo "SSCDIR=$SSCDIR" >> $GITHUB_ENV

- name: Clone Gtest
uses: actions/checkout@v2
with:
repository: google/googletest
path: googletest
ref: b85864c64758dec007208e56af933fc3f52044ee

- name: build Gtest
shell: bash
# Need to build both Release and Debug for the SSC CMake below
run: |
export
mkdir ${GTEST}/build
cd ${GTEST}/build
cmake -Dgtest_force_shared_crt=ON ..
cmake --build . --config Release -j4
cmake --build . --config Debug -j4

- name: Checkout SSC
uses: actions/checkout@v2
with:
path: ssc

- name: Configure CMake
shell: bash
# Configure cmake to build ssc tests but not tools
run: |
mkdir ${SSCDIR}/build
cd ${SSCDIR}/build
cmake .. -DSAM_SKIP_TOOLS=1
cmake --build . --config Release -j4
cp ssc/Release/* test/Release

- name: Test
shell: bash
# Turn off fast fail for when the landbosse tests write to cerr
run: |
cd ${SSCDIR}/build/test/Release
./Test.exe

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: SSC Windows Shared Libraries
path: |
${{env.SSCDIR}}\build\ssc\Release\ssc.dll
4 changes: 4 additions & 0 deletions test/ssc_test/cmod_windpower_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,10 @@ TEST(Turbine_powercurve_cmod_windpower_eqns, Case4) {
}

bool setup_python() {
if (!std::getenv("SAMNTDIR")){
std::cerr << "Python not configured.";
return false;
}
#ifdef __WINDOWS__
auto python_dir = std::string(std::getenv("SAMNTDIR")) + "\\deploy\\runtime\\python\\";
#else
Expand Down