Skip to content

Commit

Permalink
sync daily build CI with latest (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF committed Jun 18, 2023
1 parent 53307ed commit 660a1fb
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:

- name: List files for the space (Linux)
run: |
ls ${{ github.workspace }}
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress source (Linux)
Expand All @@ -139,7 +139,7 @@ jobs:
- name: List files in the space (Linux)
run: |
ls ${{ github.workspace }}
ls ${{ runner.workspace }}
ls -l ${{ runner.workspace }}
# Save files created by ctest script
- name: Save published binary (Linux)
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
- name: List files in the space (MacOS)
run: |
ls ${{ github.workspace }}
ls ${{ runner.workspace }}
ls -l ${{ runner.workspace }}
# Save files created by ctest script
- name: Save published binary (MacOS)
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
schedule:
- cron: "6 0 * * *"

permissions:
contents: read

# A workflow run is made up of one or more jobs that can run sequentially or
# in parallel.
jobs:
Expand All @@ -21,6 +24,8 @@ jobs:

call-workflow-release:
needs: [call-workflow-tarball, call-workflow-ctest]
permissions:
contents: write # In order to allow tag creation
uses: ./.github/workflows/release.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
Expand Down
50 changes: 29 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
required: true
type: string

# Minimal permissions to be inherited by any job that doesn't declare its own permissions
permissions:
contents: read

# Previous workflows must pass to get here so tag the commit that created the files
jobs:
create-tag:
Expand Down Expand Up @@ -45,8 +49,12 @@ jobs:
- run: |
echo "Tag already present: ${{ steps.tag_create.outputs.tag_exists }}"
getfiles:
PreRelease-getfiles:
runs-on: ubuntu-latest
needs: create-tag
environment: snapshots
permissions:
contents: write
steps:
- name: Get file base name
id: get-file-base
Expand Down Expand Up @@ -86,30 +94,30 @@ jobs:
name: tgz-ubuntu-2204-binary
path: ${{ github.workspace }}

# Get files used by release script

PreRelease:
runs-on: ubuntu-latest
needs: [create-tag, getfiles]
environment: snapshots
permissions:
contents: write
steps:
- name: Get file base name
id: get-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
- name: PreRelease tag
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: "snapshot"
prerelease: true
files: |
${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz
${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz
${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}-win_vs2022.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win_vs2022.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
- name: Store Release url
run: |
echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url
# - uses: actions/upload-artifact@v3
# with:
# path: ./upload_url
# name: upload_url

- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
2 changes: 1 addition & 1 deletion .github/workflows/tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:

- name: List files in the repository
run: |
ls ${{ github.workspace }}
ls -l ${{ github.workspace }}
ls $GITHUB_WORKSPACE
# Save files created by release script
Expand Down

0 comments on commit 660a1fb

Please sign in to comment.