Skip to content

Commit 7829573

Browse files
committed
[CI] multiplatform build
1 parent 7cede10 commit 7829573

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Robocomp multiplatform build
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the "main" branch
8+
push:
9+
branches: [ "main" ]
10+
pull_request:
11+
branches: [ "main" ]
12+
13+
schedule:
14+
- cron: "0 0 * * MON"
15+
16+
# Allows you to run this workflow manually from the Actions tab
17+
workflow_dispatch:
18+
19+
concurrency:
20+
group: multiplatform-build
21+
cancel-in-progress: true
22+
23+
jobs:
24+
multiplatform_build:
25+
# The host should always be Linux
26+
strategy:
27+
matrix:
28+
arch: [ aarch64, armv7, ppc64le, s390x]
29+
distro: [ ubuntu18.04, ubuntu20.04, ubuntu22.04 ] # ubuntu16.04, ubuntu18.04, ubuntu20.04,
30+
runs-on: ubuntu-latest
31+
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
32+
33+
steps:
34+
- uses: actions/checkout@v2.1.0
35+
- uses: uraimo/run-on-arch-action@v2
36+
name: Build artifact
37+
id: build
38+
with:
39+
arch: ${{ matrix.arch }}
40+
distro: ${{ matrix.distro }}
41+
42+
# Not required, but speeds up builds by storing container images in
43+
# a GitHub package registry.
44+
githubToken: ${{ github.token }}
45+
46+
# Create an artifacts directory
47+
setup: |
48+
mkdir -p "${PWD}/artifacts"
49+
# Mount the artifacts directory as /artifacts in the container
50+
dockerRunArgs: |
51+
--volume "${PWD}/artifacts:/artifacts"
52+
install: |
53+
apt update -q -y
54+
apt-get install python3-dev python3-pip python3-venv python3-wheel -y
55+
pip3 install wheel build
56+
# Set an output parameter `uname` for use in subsequent steps
57+
run: |
58+
python3 -m build --sdist --wheel --outdir dist/ cli/
59+
rm -r /artifacts/* || true
60+
cp dist/* /artifacts/ || true
61+
- name: Get the output
62+
run: |
63+
ls -al "${PWD}/artifacts"
64+
- uses: actions/upload-artifact@v3
65+
with:
66+
name: robocomp-cli-${{ matrix.distro }}-${{ matrix.arch }}
67+
path: artifacts/*

0 commit comments

Comments
 (0)