-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (72 loc) · 3.05 KB
/
test-binaries.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Test binaries
on:
workflow_call:
inputs:
test_args:
required: false
type: string
jobs:
docker-tests:
name: 🐍 • ${{ matrix.i['os'] }} • ${{ matrix.i['ver'] }} • ${{ matrix.i['arch'] }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
i: [
{ "os": "amazonlinux", "ver": "latest", "arch": "amd64" },
{ "os": "amazonlinux", "ver": "latest", "arch": "arm64" },
{ "os": "oraclelinux", "ver": "8", "arch": "amd64" },
{ "os": "oraclelinux", "ver": "8", "arch": "arm64" },
{ "os": "fedora", "ver": "35", "arch": "amd64" },
{ "os": "fedora", "ver": "37", "arch": "amd64" },
{ "os": "centos", "ver": "7", "arch": "amd64" },
{ "os": "centos", "ver": "7", "arch": "arm64" },
{ "os": "debian", "ver": "10", "arch": "amd64" },
{ "os": "debian", "ver": "10", "arch": "arm64" },
{ "os": "debian", "ver": "11", "arch": "amd64" },
{ "os": "debian", "ver": "11", "arch": "arm64" },
{ "os": "alpine", "ver": "3.17", "arch": "amd64" },
{ "os": "alpine", "ver": "3.17", "arch": "arm64" },
{ "os": "alpine", "ver": "3.19", "arch": "amd64" },
{ "os": "alpine", "ver": "3.19", "arch": "arm64" },
]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: cloud-py-api/py_bundler
path: py_bundler
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Binary type manylinux_x64
if: matrix.i['os'] != 'alpine' && matrix.i['arch'] == 'amd64'
run: echo BIN_TYPE="manylinux_amd64" >> $GITHUB_ENV
- name: Binary type manylinux_arm64
if: matrix.i['os'] != 'alpine' && matrix.i['arch'] == 'arm64'
run: echo BIN_TYPE="manylinux_arm64" >> $GITHUB_ENV
- name: Binary type musllinux_x64
if: matrix.i['os'] == 'alpine' && matrix.i['arch'] == 'amd64'
run: echo BIN_TYPE="musllinux_amd64" >> $GITHUB_ENV
- name: Binary type manylinux_arm64
if: matrix.i['os'] == 'alpine' && matrix.i['arch'] == 'arm64'
run: echo BIN_TYPE="musllinux_arm64" >> $GITHUB_ENV
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: generate-binaries-2.yml
workflow_conclusion: ""
- name: Preparations
run: |
APP_ID="$(sed -n "s/<id>\(.*\)<\/id>/\\1/p" ./appinfo/info.xml | tr -d '\t' | sed -n 1p)"
BIN_NAME="$APP_ID"_"$BIN_TYPE"
echo BIN_NAME="$BIN_NAME" >> $GITHUB_ENV
tar xf cp_binaries/$BIN_NAME.tar.gz
- name: Run tests
run: |
docker buildx build \
--platform linux/${{ matrix.i.arch }} \
--build-arg BASE_IMAGE="${{ matrix.i['os'] }}:${{ matrix.i['ver'] }}" \
--build-arg BIN_NAME="${{ env.BIN_NAME }}" \
--build-arg TEST_ARGS="${{ inputs.test_args }}" \
-f py_bundler/docker/test_binaries.Dockerfile .