|
| 1 | +name: Linux |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +env: |
| 6 | + # build Configuration, i.e. Debug, Release, etc. |
| 7 | + PRODUCT_BUILD_TYPE: Release |
| 8 | + |
| 9 | + # build Configuration, i.e. Debug, Release, etc. |
| 10 | + Configuration: Release |
| 11 | + |
| 12 | + # Required for Github Action. Unit test TestProcess.testKillAndTerminate fails to start /bin/nano with the following error: "Error opening terminal: unknown." |
| 13 | + TERM: xterm |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + # For a list of available runner types, refer to |
| 18 | + # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on |
| 19 | + runs-on: ubuntu-latest |
| 20 | + |
| 21 | + steps: |
| 22 | + - name: Checkout repository |
| 23 | + uses: actions/checkout@v4 |
| 24 | + |
| 25 | + - name: Configure GIT |
| 26 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 27 | + shell: bash |
| 28 | + run: | |
| 29 | + git config --local core.autocrlf true |
| 30 | + git config --local advice.detachedHead false |
| 31 | + git submodule update --init --recursive |
| 32 | +
|
| 33 | + - name: Setup python |
| 34 | + uses: actions/setup-python@v5 |
| 35 | + with: |
| 36 | + python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax |
| 37 | + architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified |
| 38 | + |
| 39 | + - name: Create new environment variables |
| 40 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 41 | + shell: bash |
| 42 | + run: | |
| 43 | + python -c "import os; print('GIT_REPOSITORY=' + os.path.split(os.getenv('GITHUB_REPOSITORY'))[1]);" >> $GITHUB_ENV |
| 44 | + python -c "import os; print('GIT_BRANCH=' + os.path.split(os.getenv('GITHUB_REF'))[1]);" >> $GITHUB_ENV |
| 45 | + echo GITHUB_WORKFLOW=$GITHUB_WORKFLOW>> $GITHUB_ENV |
| 46 | +
|
| 47 | + - name: List environment variables for debugging |
| 48 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 49 | + shell: bash |
| 50 | + run: | |
| 51 | + env |
| 52 | +
|
| 53 | + - name: Configure user profile and directories |
| 54 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 55 | + shell: bash |
| 56 | + run: | |
| 57 | + mkdir ~/Documents #required for TestUser.testFoldersExisting() because /home/travis/Documents does not exists! |
| 58 | + mkdir ~/Desktop #required for TestUser.testFoldersExisting() because /home/travis/Desktop does not exists! |
| 59 | + |
| 60 | + - name: Install yamlpath |
| 61 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 62 | + shell: bash |
| 63 | + run: ./ci/github/install_yamlpath.sh |
| 64 | + |
| 65 | + - name: Install pyserial |
| 66 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 67 | + shell: bash |
| 68 | + run: ./ci/github/install_pyserial.sh |
| 69 | + |
| 70 | + - name: Install Arduino CLI |
| 71 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 72 | + shell: bash |
| 73 | + run: ./ci/github/install_arduinocli.sh |
| 74 | + |
| 75 | + - name: Install Arduino cores |
| 76 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 77 | + shell: bash |
| 78 | + run: ./ci/github/install_arduino_cores.sh |
| 79 | + |
| 80 | + - name: Install Arduino library dependencies |
| 81 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 82 | + shell: bash |
| 83 | + run: ./ci/github/arduino_install_libraries.sh |
| 84 | + |
| 85 | + - name: Install this arduino library |
| 86 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 87 | + shell: bash |
| 88 | + run: ./ci/github/install_this.sh |
| 89 | + |
| 90 | + - name: Build Arduino sketch - rtttl_blocking |
| 91 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 92 | + shell: bash |
| 93 | + run: python ci/generic/arduino_build_sketch.py rtttl_blocking |
| 94 | + |
| 95 | + - name: Build Arduino sketch - rtttl_demo |
| 96 | + working-directory: ${{env.GITHUB_WORKSPACE}} |
| 97 | + shell: bash |
| 98 | + run: python ci/generic/arduino_build_sketch.py rtttl_demo |
0 commit comments