Skip to content

[SC64][SW] Add Windows 32-bit build for sc64deployer #231

[SC64][SW] Add Windows 32-bit build for sc64deployer

[SC64][SW] Add Windows 32-bit build for sc64deployer #231

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- created
workflow_dispatch:
jobs:
# build-firmware:
# runs-on: ubuntu-latest
# steps:
# - name: Download SummerCart64 repository
# uses: actions/checkout@v3
# - name: Set package version
# uses: frabert/replace-string-action@v2
# id: version
# with:
# pattern: '\/'
# string: '${{ github.ref_name }}'
# replace-with: '-'
# - name: Build firmware
# run: ./docker_build.sh release --force-clean
# env:
# SC64_VERSION: ${{ steps.version.outputs.replaced }}
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: sc64-pkg-${{ steps.version.outputs.replaced }}
# path: |
# sc64-extra-${{ steps.version.outputs.replaced }}.zip
# sc64-firmware-${{ steps.version.outputs.replaced }}.bin
# - name: Upload release assets
# if: github.event_name == 'release' && github.event.action == 'created'
# uses: softprops/[email protected]
# with:
# files: |
# sc64-extra-${{ steps.version.outputs.replaced }}.zip
# sc64-firmware-${{ steps.version.outputs.replaced }}.bin
build-deployer:
strategy:
matrix:
version: [windows, windows-32bit, linux, macos]
include:
- version: windows
os: windows-latest
release-dir: target/release
executable: sc64deployer.exe
name: sc64-deployer-windows
package: zip
extension: zip
- version: windows-32bit
os: windows-latest
build-params: --target=i686-pc-windows-msvc
release-dir: target/i686-pc-windows-msvc/release
executable: sc64deployer.exe
name: sc64-deployer-windows-32bit
package: zip
extension: zip
- version: linux
os: ubuntu-latest
linux-packages: libudev-dev
release-dir: target/release
executable: sc64deployer
name: sc64-deployer-linux
package: tar -czf
extension: tar.gz
- version: macos
os: macos-latest
release-dir: target/release
executable: sc64deployer
name: sc64-deployer-macos
package: tar -czf
extension: tgz
runs-on: ${{ matrix.os }}
steps:
- name: Download SummerCart64 repository
uses: actions/checkout@v3
- name: Set package version
uses: frabert/replace-string-action@v2
id: version
with:
pattern: '\/'
string: '${{ github.ref_name }}'
replace-with: '-'
- name: Install linux packages
if: matrix.linux-packages
run: |
sudo apt-get update
sudo apt-get -y install ${{ matrix.linux-packages }}
- name: Build deployer
run: cargo b -r ${{ matrix.build-params }}
working-directory: sw/deployer
- name: Package executable
run: |
PACKAGE_DIR=$(pwd)/package
mkdir -p $PACKAGE_DIR
cd ${{ matrix.release-dir }}
${{ matrix.package }} $PACKAGE_DIR/${{ matrix.name }}-${{ steps.version.outputs.replaced }}.${{ matrix.extension }} ${{ matrix.executable }}
shell: bash
working-directory: sw/deployer
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}-${{ steps.version.outputs.replaced }}
path: sw/deployer/package/${{ matrix.name }}-${{ steps.version.outputs.replaced }}.${{ matrix.extension }}
- name: Upload release assets
if: github.event_name == 'release' && github.event.action == 'created'
uses: softprops/[email protected]
with:
files: |
sw/deployer/package/${{ matrix.name }}-${{ steps.version.outputs.replaced }}.${{ matrix.extension }}