Search code examples
githubbuildgithub-actionsarm-none-eabi-gcc

GitHub Actions jobs sequence


I'm trying to implement sequence of jobs on GitHub Actions: checkout and upload arm-none-eabi-gcc compiler, next build matrix of different targets, next create release and upload release assets (matrix).

For checkout I use actions/checkout@v2 with clean false flag, to split jobs strategy:matrix: of course. fiam/arm-none-eabi-gcc@v1 - uploads gcc.

jobs:
  preparation:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
      with:
         clean: false
    - name: Install python dependencies
      run: |
        python3 -m pip install --upgrade pip
        python3 -m pip install -r ./tools/requirements.txt
    - name: Install arm-none-eabi-gcc
      uses: fiam/arm-none-eabi-gcc@v1
      with:
        release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
  build:
    needs: preparation
    runs-on: ubuntu-latest
    strategy:
      matrix:
    *** build cmds ***
  release:
    needs: build
    runs-on: ubuntu-latest
    steps:
    - name: Create Release
      id: create_release
      uses: actions/create-release@v1

  upload:
    needs: release
    runs-on: ubuntu-latest
    strategy:
      matrix:

I have two splits at build and at upload jobs.

Is it possible to create this sequence in github actions? How can I disable Post checkout cleanup to store uploaded compiler?


Solution

  • There is only two ways to share files between jobs:

    1. Cache
    2. Artifacts