-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.72 KB
/
devcontainer_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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