summaryrefslogtreecommitdiffstats
path: root/.github/workflows/daily-build.yml
blob: b3af5a4404c6e3addf89e07a12f60c2e3a5b65a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: hdf5 1.14 daily build

# Controls when the action will run. Triggers the workflow on a schedule
on:
  workflow_dispatch:
  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:
  get-old-names:
    runs-on: ubuntu-latest
    outputs:
      hdf5-name: ${{ steps.gethdf5base.outputs.HDF5_NAME_BASE }}

    steps:
    - uses: actions/checkout@v4.1.1

    - name: Get hdf5 release base name
      uses: dsaltares/fetch-gh-release-asset@master
      with:
        version: 'tags/snapshot-1.14'
        file: 'last-file.txt'

    - name: Read base-name file
      id: gethdf5base
      run: echo "HDF5_NAME_BASE=$(cat last-file.txt)" >> $GITHUB_OUTPUT

    - run: echo "hdf5 base name is ${{ steps.gethdf5base.outputs.HDF5_NAME_BASE }}."

  call-workflow-tarball:
    uses: ./.github/workflows/tarball.yml
    with:
      #use_tag: snapshot-1.14
      use_environ: snapshots

  call-workflow-ctest:
    needs: call-workflow-tarball
    uses: ./.github/workflows/cmake-ctest.yml
    with:
      file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
      preset_name: ci-StdShar
      #use_tag: snapshot-1.14
      #use_environ: snapshots
    if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }}

  call-workflow-abi:
    needs: [call-workflow-tarball, call-workflow-ctest]
    uses: ./.github/workflows/abi-report.yml
    with:
      file_ref: '1_14_3'
      file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
      use_tag: snapshot
      use_environ: snapshots
    if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }}

  call-workflow-release:
    needs: [call-workflow-tarball, call-workflow-ctest, call-workflow-abi]
    permissions:
      contents: write # In order to allow tag creation
    uses: ./.github/workflows/release-files.yml
    with:
      file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
      file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }}
      file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }}
      use_tag: snapshot-1.14
      use_environ: snapshots
    if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }}

  call-workflow-remove:
    needs: [get-old-names, call-workflow-tarball, call-workflow-ctest, call-workflow-abi, call-workflow-release]
    permissions:
      contents: write # In order to allow file deletion
    uses: ./.github/workflows/remove-files.yml
    with:
      file_base: ${{ needs.get-old-names.outputs.hdf5-name }}
      use_tag: snapshot-1.14
      use_environ: snapshots
    if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }}