Skip to content

Commit

Permalink
workflow fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophist-UK committed Feb 21, 2024
1 parent fe4e557 commit 0b9c9e4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ jobs:
exclude:
- nolcd: 1
lang: [fr, de]

name: Build ${{ matrix.lang }}
uses: ./.github/workflows/build_single.yaml
with:
lang: ${{ matrix.lang }}
bicol: ${{ matrix.bicol }}
filsens: ${{ matrix.filsens }}
trapez: ${{ matrix.trap }}
trapez: ${{ matrix.trapez }}
xl: ${{ matrix.xl }}
nolcd: ${{ matrix.nolcd }}
therm: ${{ matrix.therm }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
lang: ${{ matrix.lang }}
bicol: ${{ matrix.bicol }}
filsens: ${{ matrix.filsens }}
trapez: ${{ matrix.trap }}
trapez: ${{ matrix.trapez }}
xl: ${{ matrix.xl }}
nolcd: ${{ matrix.nolcd }}
therm: ${{ matrix.therm }}
Expand Down
35 changes: 18 additions & 17 deletions .github/workflows/build_single.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ jobs:
BUILD_FILE: ${{ format('{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}',
github.ref_name,
'-',
(inputs.nolcd && '-nolcd') || inputs.lang,
(inputs.bicolor && '-bicolor') || '',
(inputs.filsens && '-xtrudplus') || '',
(inputs.trapez && '-trapez') || '',
(inputs.xl && '-xl') || '',
(inputs.therm && '-blktherm') || '',
(inputs.pinout && '-stdpinout') || '',
(inputs.z122 && '-z122') || '',
(inputs.bltouch && '-bltouch') || '',
(inputs.nolcd == '1' && '-nolcd') || inputs.lang,
(inputs.bicolor == '1' && '-bicolor') || '',
(inputs.filsens == '1' && '-xtrudplus') || '',
(inputs.trapez == '1' && '-trapez') || '',
(inputs.xl == '1' && '-xl') || '',
(inputs.therm == '1' && '-blktherm') || '',
(inputs.pinout == '1' && '-stdpinout') || '',
(inputs.z122 == '1' && '-z122') || '',
(inputs.bltouch == '1' && '-bltouch') || '',
'.hex') }}
name: "Build:[\
${{ (inputs.nolcd == '1' && 'nolcd') || inputs.lang }},
Expand All @@ -183,9 +183,9 @@ jobs:
xl:${{ inputs.xl }},
nolcd:${{ inputs.nolcd }},
therm:${{ inputs.therm }},
bltouch:${{ inputs.bltouch }}\
bltouch:${{ inputs.bltouch }},
pinout:${{ inputs.pinout }},
z122:${{ inputs.z122 }}
z122:${{ inputs.z122 }}\
]"
steps:
- name: Checkout
Expand All @@ -206,10 +206,11 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
echo "Build file:" $BUILD_FILE
- name: Build with PlatformIO
run: platformio run
env:
run: |
echo "Build file:" $BUILD_FILE
platformio run
env:
PLATFORMIO_BUILD_FLAGS: "\
-D DE200_LANGUAGE=${{ inputs.lang }}
${{ (inputs.bicolor == '1' && '-D DE200_BICOLOR') || '' }}
Expand All @@ -223,17 +224,17 @@ jobs:
${{ (inputs.bltouch == '1' && '-D DE200_BLTOUCH') || '' }}
"
- name: Rename file
run: mv .pio/build/megaatmega2560/firmware.hex .pio/build/megaatmega2560/$BUILD_FILE
run: mv .pio/build/mega2560/firmware.hex .pio/build/mega2560/$BUILD_FILE
- name: Upload build
# uses: actions/upload-artifact@v4
# with:
# name: $BUILD_FILE
# path: .pio/build/megaatmega2560/firmware.hex
# path: .pio/build/mega2560/firmware.hex
# compression-level: 9
# if-no-files-found: error
uses: nanoufo/action-upload-artifacts-and-release-assets@v2
with:
path: .pio/build/megaatmega2560/${{ env.BUILD_FILE }}
path: .pio/build/mega2560/${{ env.BUILD_FILE }}
compression-level: 9
upload-release-files: ${{ github.event_name == 'release' }}
if-no-files-found: error

0 comments on commit 0b9c9e4

Please sign in to comment.