Skip to content

Commit 8305073

Browse files
committed
test build arm by workflow
Signed-off-by: Frank Li <Frank.Li@nxp.com>
1 parent c66737a commit 8305073

1 file changed

Lines changed: 82 additions & 0 deletions

File tree

.github/workflows/build_arm.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Build for arm ubuntu
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- uuu*
9+
pull_request:
10+
types:
11+
- opened
12+
- synchronize
13+
14+
jobs:
15+
build_job:
16+
# The host should always be linux
17+
runs-on: ubuntu-latest
18+
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
19+
20+
# Run steps on a matrix of 4 arch/distro combinations
21+
strategy:
22+
matrix:
23+
include:
24+
- arch: aarch64
25+
distro: ubuntu18.04
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: uraimo/run-on-arch-action@v2
29+
name: Build artifact
30+
id: build
31+
with:
32+
arch: ${{ matrix.arch }}
33+
distro: ${{ matrix.distro }}
34+
35+
# Not required, but speeds up builds
36+
githubToken: ${{ github.token }}
37+
38+
# Mount the artifacts directory as /artifacts in the container
39+
dockerRunArgs: |
40+
--volume "${PWD}:/mfgtools"
41+
42+
# Pass some environment variables to the container
43+
env: | # YAML, but pipe character is necessary
44+
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
45+
46+
# The shell to run commands with in the container
47+
shell: /bin/sh
48+
49+
# Install some dependencies in the container. This speeds up builds if
50+
# you are also using githubToken. Any dependencies installed here will
51+
# be part of the container image that gets cached, so subsequent
52+
# builds don't have to re-install them. The image layer is cached
53+
# publicly in your project's package repository, so it is vital that
54+
# no secrets are present in the container state or logs.
55+
install: |
56+
case "${{ matrix.distro }}" in
57+
ubuntu*|jessie|stretch|buster|bullseye)
58+
apt-get update -q -y
59+
apt-get install -q -y git
60+
;;
61+
fedora*)
62+
dnf -y update
63+
dnf -y install git which
64+
;;
65+
alpine*)
66+
apk update
67+
apk add git
68+
;;
69+
esac
70+
71+
# Produce a binary artifact and place it in the mounted volume
72+
run: |
73+
cd /mfgtools
74+
cmake .
75+
make
76+
77+
- name: Show the artifact
78+
# Items placed in /artifacts in the container will be in
79+
# ${PWD}/artifacts on the host.
80+
run: |
81+
ls -al "${PWD}"
82+

0 commit comments

Comments
 (0)