-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.8 KB
/
multiplatform_build.yaml
File metadata and controls
60 lines (52 loc) · 1.8 KB
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
56
57
58
59
60
# This is a basic workflow to help you get started with Actions
name: Robocomp multiplatform build
# Controls when the workflow will run
on:
workflow_call:
workflow_dispatch:
concurrency:
group: multiplatform-build
cancel-in-progress: true
jobs:
multiplatform_build:
# The host should always be Linux
strategy:
matrix:
arch: [ aarch64, armv7, ppc64le, s390x]
distro: [ ubuntu18.04, ubuntu20.04, ubuntu22.04 ]
fail-fast: false
runs-on: ubuntu-latest
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
steps:
- uses: actions/checkout@v2.1.0
- uses: uraimo/run-on-arch-action@v2
name: Build artifact
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# Not required, but speeds up builds by storing container images in
# a GitHub package registry.
githubToken: ${{ github.token }}
# Create an artifacts directory
setup: |
mkdir -p "${PWD}/artifacts"
# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
install: |
apt update -q -y
apt-get install python3-dev python3-pip python3-venv python3-wheel -y
pip3 install wheel build
# Set an output parameter `uname` for use in subsequent steps
run: |
python3 -m build --sdist --wheel --outdir dist/ cli/
rm -r /artifacts/* || true
cp dist/* /artifacts/ || true
- name: Get the output
run: |
ls -al "${PWD}/artifacts"
- uses: actions/upload-artifact@v3
with:
name: robocomp-cli-${{ matrix.distro }}-${{ matrix.arch }}
path: artifacts/*