Skip to content

Commit

Permalink
add downstream testing for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibbelink committed May 3, 2024
1 parent 9146f78 commit fb2d5d9
Showing 1 changed file with 56 additions and 24 deletions.
80 changes: 56 additions & 24 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
- 'doc/**'
- 'CHANGELOG.rst'


jobs:
build-test-ubuntu:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -139,29 +140,6 @@ jobs:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_NAME }}.txt

upload-pr-number:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout cyclus
uses: actions/checkout@v4

- name: Save PR number and Commit hash to file
run: |
echo "${{ github.event.number }}" > pr_number
echo "${{ github.event.pull_request.head.sha }} - $(git log -1 --format=%ci)" > commit_hash_timestamp
- name: Upload PR number artifact
uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number

- name: Upload Commit hash artifact
uses: actions/upload-artifact@v4
with:
name: commit_hash_timestamp
path: commit_hash_timestamp

build-test-rocky:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -190,6 +168,7 @@ jobs:
build-args: |
rocky_version=${{ matrix.rocky_versions }}
build-test-macos:
strategy:
fail-fast: false
Expand Down Expand Up @@ -271,4 +250,57 @@ jobs:
python3 install.py -j 3
export PATH=$HOME/.local/bin:$PATH
export DYLD_LIBRARY_PATH=$HOME/.local/lib
cd tests && python3 -m pytest
cd tests && python3 -m pytest
- name: Export Environment Variables
if: github.event_name == 'pull_request'
run: |
echo "CYCAMORE_BUILD_STATUS=${{steps.build-cycamore.outcome == 'success' && '**Success** :white_check_mark:' ||
steps.build-cycamore.outcome == 'failure' && '**Failure** :x:' ||
'**Skipped due to upstream failure** :warning:'}}" >> "$GITHUB_ENV"
echo "CYMETRIC_BUILD_STATUS=${{steps.build-cymetric.outcome == 'success' && '**Success** :white_check_mark:' ||
steps.build-cymetric.outcome == 'failure' && '**Failure** :x:' ||
'**Skipped due to upstream failure** :warning:'}}" >> "$GITHUB_ENV"
echo "ARTIFACT_NAME=${{ matrix.osx_versions }}" >> "$GITHUB_ENV"
- name: Construct Artifact
if: github.event_name == 'pull_request'
run: |
echo "
##### Build \`${{ matrix.osx_versions }}\`
- Cycamore: ${{ env.CYCAMORE_BUILD_STATUS }}
- Cymetric: ${{ env.CYMETRIC_BUILD_STATUS }}" > ${{ env.ARTIFACT_NAME }}.txt
- name: Upload Artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_NAME }}.txt


upload-pr-number:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout cyclus
uses: actions/checkout@v4

- name: Save PR number and Commit hash to file
run: |
echo "${{ github.event.number }}" > pr_number
echo "${{ github.event.pull_request.head.sha }} - $(git log -1 --format=%ci)" > commit_hash_timestamp
- name: Upload PR number artifact
uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number

- name: Upload Commit hash artifact
uses: actions/upload-artifact@v4
with:
name: commit_hash_timestamp
path: commit_hash_timestamp

0 comments on commit fb2d5d9

Please sign in to comment.