Skip to content

Commit

Permalink
Add Mac installer testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed Apr 24, 2024
1 parent fa47f2f commit 4d54404
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/linux_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,5 @@ jobs:
working-directory: package
run: ls

# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

- name: Run Package Tests
run: python checkout/scripts/package_tests/runner.py --verbose ${{ matrix.test_key }} package/
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

jobs:
mac_release:
build_installer_artifact:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow_failure }}
strategy:
Expand All @@ -35,7 +35,7 @@ jobs:
# os: macos-14
# allow_failure: false
# arch: arm64
# python: 3.12.0
# python: 3.12.0 # Make sure to add the package testing below for ARM once we add this build to GHA
permissions:
# Needed permission to upload the release asset
contents: write
Expand Down Expand Up @@ -77,6 +77,8 @@ jobs:
- name: Create Build Directory
run: cmake -E make_directory ./build/

# should we pin to a specific version of CMake here like we did on Windows?

- name: Configure CMake
working-directory: ./build
shell: bash
Expand Down Expand Up @@ -109,6 +111,15 @@ jobs:
otool -L PostProcess/ReadVarsESO || true
otool -L PostProcess/HVAC-Diagram || true
- name: Upload Tarball as artifact for testing
uses: actions/upload-artifact@v4
with:
name: energyplus-${{ matrix.os }}
path: build/EnergyPlus-*-${{ matrix.arch }}.tar.gz
if-no-files-found: error
retention-days: 7
overwrite: false

- name: Upload Tarball to release
uses: svenstaro/upload-release-action@v2
with:
Expand All @@ -126,3 +137,58 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true

test_package:
name: Test Built Package
needs: build_installer_artifact
runs-on: ${{ matrix.os }}
strategy:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
macos_dev_target: [ 11.6, 12.1 ] #, 13.0]
include:
- macos_dev_target: 11.6
os: macos-11
arch: x86_64
python: 3.8
test_key: mac11
- macos_dev_target: 12.1
os: macos-12
arch: x86_64
python: 3.8
test_key: mac12
# - macos_dev_target: 13.0
# os: macos-14
# arch: arm64
# python: 3.12.0 # Make sure to add the package testing below for ARM once we add this build to GHA

steps:
- uses: actions/checkout@v3 # Still need E+ checked out to get testing scripts
with:
path: checkout

- name: Set up Python ${{ env.Python_REQUIRED_VERSION }}
uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ env.Python_REQUIRED_VERSION }}
architecture: ${{ matrix.arch }}

- name: Gather Test Package from Artifacts
uses: actions/download-artifact@v4
with:
name: energyplus-${{ matrix.os }}
path: package

- name: Check Contents
shell: bash
run: ls

- name: Check Package contents
shell: bash
working-directory: package
run: ls

- name: Run Package Tests
run: python checkout/scripts/package_tests/runner.py --verbose ${{ matrix.test_key }} package/

0 comments on commit 4d54404

Please sign in to comment.