Skip to content

testing CI

testing CI #7

name: Dev Container CI
on: [push]
jobs:
build:
strategy:
matrix:
platform:
- riscv64
- arm64
- armhf
runs-on: ubuntu-20.04
steps:
- run: ls -al
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run Dev Container
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/${{ github.repository_owner }}/armhf_cross_compile/devcontainer
cacheFrom: ghcr.io/${{ github.repository_owner }}/armhf_cross_compile/devcontainer
runCmd: |
if [ "${{ matrix.platform }}" == "arm64" ]; then
export CROSS_ARCH=${{ matrix.platform }}
export CC=aarch64-linux-gnu-gcc
export CPP=aarch64-linux-gnu-g++
elif [ "${{ matrix.platform }}" == "armhf" ]; then
export CROSS_ARCH=${{ matrix.platform }}
export CC=arm-linux-gnueabihf-gcc
export CPP=aarch64-linux-gnu-gcc
elif [ "${{ matrix.platform }}" == "riscv64" ]; then
export CROSS_ARCH=${{ matrix.platform }}
export CC=riscv64-linux-gnu-gcc
export CPP=aarch64-linux-gnu-gcc
fi
make cross_compile
- name: Upload files to GH release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: firmware_${{ matrix.platform }}.bin
asset_name: firmware_${{ matrix.platform }}.bin
prerelease: true