.github/workflows/prep_sources.yml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sun, 31 Jul 2022 16:43:25 +0200
changeset 79 a8b434605895
parent 77 2f3d1cd0bd64
child 84 8e01f3bb59df
permissions -rw-r--r--
Add Snap Package.

For now :
- using makefile :
$ cd ~/build; make -f ~/src/beremiz_public_dist/Makefile DIST=snap
- build and run of python exemple was tested
- no fieldbus support yet.
name: Prepare sources

on:
  workflow_call:
    outputs:
      beremiz_revisionid:
        value: ${{ jobs.get_sources.env.beremiz_revisionid }}
      matiec_revisionid:
        value: ${{ jobs.get_sources.env.matiec_revisionid }}
      canfestival_revisionid:
        value: ${{ jobs.get_sources.env.canfestival_revisionid }}

jobs:
  get_sources:
    runs-on: ubuntu-latest

    env:
        beremiz_revisionid: c3847f87bde2d520b856e353498cb2bad9d83911
        matiec_revisionid: ba00e2b18e7335c03c011e1c6b2a5d99fc3571c3
        canfestival_revisionid: 12a05e422666c738d1312259703f80150c747cb5


    steps:
    # repositories are directly checked out where Makerfile expects them to be
    - uses: actions/checkout@v3
      with:
          repository: beremiz/beremiz
          ref: ${{ env.beremiz_revisionid }}
          path: build/sources/beremiz

    - uses: actions/checkout@v3
      with:
          repository: beremiz/matiec
          ref: ${{ env.matiec_revisionid }}
          path: build/sources/matiec

    - uses: actions/checkout@v3
      with:
          repository: beremiz/canfestival
          ref: ${{ env.canfestival_revisionid }}
          path: build/sources/canfestival

    - name: Touch expected Makfile targets to shortcut HG checkout
      run: |
        touch build/sources/beremiz_${{ env.beremiz_revisionid }}
        touch build/sources/matiec_${{ env.matiec_revisionid }}
        touch build/sources/canfestival_${{ env.canfestival_revisionid }}
        touch build/sources/beremiz_src
        touch build/sources/matiec_src
        touch build/sources/canfestival_src
        touch build/own_sources
        cat >> build/revisions.txt <<EOF
        beremiz_public_dist ${{ github.sha }}
        beremiz ${{ env.beremiz_revisionid }}
        matiec ${{ env.matiec_revisionid }}
        canfestival ${{ env.canfestival_revisionid }}
        EOF

    - name: Upload source artifact
      uses: actions/upload-artifact@v3
      with:
        name: source_package
        path: build