only:Build Custom Board Firmware

This commit is contained in:
rusefillc 2023-12-01 23:46:13 -05:00
parent 62faf47024
commit ae7c7bc400
3 changed files with 155 additions and 17 deletions

View File

@ -1,17 +0,0 @@
name: Build Custom Board Firmware
on:
workflow_call:
inputs:
shortBoardName:
required: true
type: string
jobs:
create-board:
runs-on: ubuntu-latest
steps:
- name: Echo
run: |
echo "${{ inputs.shortBoardName }}"

View File

@ -0,0 +1,117 @@
#
# see https://github.com/rusefi/fw-Paralela/blob/master/.github/workflows/compile-board.yaml as an example of how to build custom board firmware
#
name: Build Custom Board Firmware
on:
workflow_call:
inputs:
shortBoardName:
required: true
type: string
iniFileName:
required: true
type: string
jobs:
create-board:
runs-on: ubuntu-latest
steps:
- name: Echo
run: |
echo "shortBoardName=${{inputs.shortBoardName}} iniFileName=${{inputs.iniFileName}}"
- uses: actions/checkout@v3
with:
submodules: recursive
# Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path
- name: Download & Install GCC
if: ${{ env.skip != 'true' }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
ext/rusefi/firmware/provide_gcc.sh
echo "::add-path::`pwd`/gcc-arm-none-eabi/bin"
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Test Compiler
run: javac -version
- name: Install Tools
run: |
sudo bash ext/rusefi/misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install sshpass sshpass mtools
- name: Removing other .ini files since we will be uploading
working-directory: ext/rusefi/
run: rm -rf firmware/tunerstudio/generated/*.ini
- name: Gen Config
working-directory: ext/rusefi/firmware
run: |
bash gen_config_board.sh ../../.. ${{inputs.shortBoardName}}
- name: Gen Config Status
working-directory: ext/rusefi
run: |
git status
- name: Upload .ini files to server
working-directory: ext/rusefi/firmware/tunerstudio/generated
run: ../upload_ini.sh ${{inputs.iniFileName}} ${{ secrets.RUSEFI_ONLINE_FTP_USER }} ${{ secrets.RUSEFI_ONLINE_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
- name: Build Firmware
working-directory: ext/rusefi
run: bash misc/jenkins/compile_other_versions/compile.sh ../../.. ${{inputs.shortBoardName}}
- name: Upload build bin artifact
uses: actions/upload-artifact@v3
with:
name: rusefi.bin
path: ext/rusefi/firmware/deliver/rusefi*.bin
- name: Upload build hex artifact
uses: actions/upload-artifact@v3
with:
name: rusefi.hex
path: ext/rusefi/firmware/deliver/rusefi*.hex
- name: Upload build map artifact
uses: actions/upload-artifact@v3
with:
name: rusefi.map
path: ext/rusefi/firmware/deliver/rusefi*.map
- name: Build console
working-directory: ext/rusefi/
run: bash misc/jenkins/build_java_console.sh
- name: Set SSH variables
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then
echo "Setting credentials..."
echo "RUSEFI_SSH_SERVER=${{secrets.RUSEFI_SSH_SERVER}}" >> $GITHUB_ENV
echo "RUSEFI_SSH_USER=${{secrets.RUSEFI_SSH_USER}}" >> $GITHUB_ENV
echo "RUSEFI_SSH_PASS=${{secrets.RUSEFI_SSH_PASS}}" >> $GITHUB_ENV
else
echo "NOT setting credentials: ${{github.event_name}} ${{github.ref}}"
fi
- name: Package and Upload Bundle
working-directory: ext/rusefi/
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh ${{inputs.shortBoardName}} ${{inputs.iniFileName}} master
- name: Upload bundle artifact
uses: actions/upload-artifact@v3
with:
name: rusefi_bundle_${{inputs.shortBoardName}}.zip
path: ext/rusefi/artifacts/rusefi_bundle*.zip

View File

@ -0,0 +1,38 @@
#
#
#
name: Update rusEFI Reference
on:
workflow_call:
jobs:
update-git:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Git Checkout Submodules
run: |
git submodule update --init --depth=1 ext/rusefi
- name: Git Update Submodules
run: |
git submodule update --remote
- name: Commit fresh submodules
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub git update Action"
git add ext/rusefi
git commit -am "GHA says update submodule"
git status
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}