.github/workflows/prep_sources.yml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sun, 14 Aug 2022 16:54:43 +0200
changeset 97 4dd65c75e651
parent 96 52b64ebc1970
child 98 54c0e2662dd3
permissions -rw-r--r--
GH CD: Seriously ? https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files
68
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     1
name: Prepare sources
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     2
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     3
on:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     4
  workflow_call:
96
52b64ebc1970 GH CD: seems that reusable workflow outputs can't make their way through.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 95
diff changeset
     5
68
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     6
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     7
jobs:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     8
  get_sources:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     9
    runs-on: ubuntu-latest
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    10
76
1ed6c9812863 GH CI : adapt to workflow syntax restrictions
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 73
diff changeset
    11
    env:
91
8d8e7a792903 Beremiz revision bump
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 85
diff changeset
    12
        beremiz_revisionid: 45a361db05a3e243ad15467fa066ea96aee48861
76
1ed6c9812863 GH CI : adapt to workflow syntax restrictions
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 73
diff changeset
    13
        matiec_revisionid: ba00e2b18e7335c03c011e1c6b2a5d99fc3571c3
1ed6c9812863 GH CI : adapt to workflow syntax restrictions
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 73
diff changeset
    14
        canfestival_revisionid: 12a05e422666c738d1312259703f80150c747cb5
84
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    15
        Modbus_revisionid: 75ba7cb15908411e71bf0e7b66651d182f347747
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    16
        open62541_revisionid: ff73268829359639531ff02905c889f73a77b408
76
1ed6c9812863 GH CI : adapt to workflow syntax restrictions
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 73
diff changeset
    17
1ed6c9812863 GH CI : adapt to workflow syntax restrictions
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 73
diff changeset
    18
68
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    19
    steps:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    20
    # repositories are directly checked out where Makerfile expects them to be
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    21
    - uses: actions/checkout@v3
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    22
      with:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    23
          repository: beremiz/beremiz
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    24
          ref: ${{ env.beremiz_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    25
          path: build/sources/beremiz
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    26
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    27
    - uses: actions/checkout@v3
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    28
      with:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    29
          repository: beremiz/matiec
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    30
          ref: ${{ env.matiec_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    31
          path: build/sources/matiec
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    32
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    33
    - uses: actions/checkout@v3
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    34
      with:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    35
          repository: beremiz/canfestival
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    36
          ref: ${{ env.canfestival_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    37
          path: build/sources/canfestival
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    38
84
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    39
    - uses: actions/checkout@v3
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    40
      with:
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    41
          repository: beremiz/Modbus
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    42
          ref: ${{ env.Modbus_revisionid }}
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    43
          path: build/sources/Modbus
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    44
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    45
    - uses: actions/checkout@v3
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    46
      with:
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    47
          repository: open62541/open62541
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    48
          ref: ${{ env.open62541_revisionid }}
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    49
          path: build/sources/open62541
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    50
96
52b64ebc1970 GH CD: seems that reusable workflow outputs can't make their way through.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 95
diff changeset
    51
    - name: Keep Makfile satisfied and generate revisions.txt
68
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    52
      run: |
96
52b64ebc1970 GH CD: seems that reusable workflow outputs can't make their way through.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 95
diff changeset
    53
        touch build/sources/beremiz_stamp
52b64ebc1970 GH CD: seems that reusable workflow outputs can't make their way through.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 95
diff changeset
    54
        touch build/sources/matiec_stamp
52b64ebc1970 GH CD: seems that reusable workflow outputs can't make their way through.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 95
diff changeset
    55
        touch build/sources/canfestival_stamp
52b64ebc1970 GH CD: seems that reusable workflow outputs can't make their way through.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 95
diff changeset
    56
        touch build/sources/Modbus_stamp
52b64ebc1970 GH CD: seems that reusable workflow outputs can't make their way through.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 95
diff changeset
    57
        touch build/sources/open62541_stamp
68
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    58
        touch build/sources/beremiz_src
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    59
        touch build/sources/matiec_src
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    60
        touch build/sources/canfestival_src
84
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    61
        touch build/sources/Modbus_src
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    62
        touch build/sources/open62541_src
68
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    63
        touch build/own_sources
95
21dcb1a70f5d GH CD: place revisions.txt so that snapcraft can find it.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 91
diff changeset
    64
        cat >> build/sources/revisions.txt <<EOF
68
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    65
        beremiz_public_dist ${{ github.sha }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    66
        beremiz ${{ env.beremiz_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    67
        matiec ${{ env.matiec_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    68
        canfestival ${{ env.canfestival_revisionid }}
84
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    69
        Modbus ${{ env.Modbus_revisionid }}
8e01f3bb59df GH CD: Add Modbus and open62541 sources.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 77
diff changeset
    70
        open62541 ${{ env.open62541_revisionid }}
68
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    71
        EOF
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    72
97
4dd65c75e651 GH CD: Seriously ? https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 96
diff changeset
    73
    - name: Tar files
4dd65c75e651 GH CD: Seriously ? https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 96
diff changeset
    74
      run: tar -cvf build.tar build
4dd65c75e651 GH CD: Seriously ? https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 96
diff changeset
    75
77
2f3d1cd0bd64 GH CI : use artifacts to get data flowing from one workflow to the other
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 76
diff changeset
    76
    - name: Upload source artifact
2f3d1cd0bd64 GH CI : use artifacts to get data flowing from one workflow to the other
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 76
diff changeset
    77
      uses: actions/upload-artifact@v3
2f3d1cd0bd64 GH CI : use artifacts to get data flowing from one workflow to the other
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 76
diff changeset
    78
      with:
2f3d1cd0bd64 GH CI : use artifacts to get data flowing from one workflow to the other
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 76
diff changeset
    79
        name: source_package
97
4dd65c75e651 GH CD: Seriously ? https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 96
diff changeset
    80
        path: build.tar