File: release_arch.yml

package info (click to toggle)
austin 3.7.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 11,444 kB
  • sloc: ansic: 8,622; python: 2,669; sh: 106; makefile: 54
file content (88 lines) | stat: -rw-r--r-- 2,682 bytes parent folder | download | duplicates (3)
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
83
84
85
86
87
88
name: Release (Linux archs)
on:
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
  release-linux-archs:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        arch: ["armv7", "aarch64", "ppc64le"]
      fail-fast: false
    name: Build on ${{ matrix.arch }}
    steps:
      - uses: actions/checkout@v3
        name: Checkout sources
      
      - uses: uraimo/run-on-arch-action@v2.0.5
        name: Run tests on ${{ matrix.arch }}
        id: run-tests-on-arch
        with:
          arch: ${{ matrix.arch }}
          distro: ubuntu20.04
          githubToken: ${{ github.token }}
          dockerRunArgs:  --volume "${GITHUB_WORKSPACE}/artifacts:/artifacts"
          setup: |
            mkdir -p ./artifacts
          run: ARCH=${{ matrix.arch }} bash scripts/build_arch.sh

      - name: Show artifacts
        run: |
          ls -al ./artifacts

      - name: Upload binaries to release
        uses: svenstaro/upload-release-action@v2
        with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          file: artifacts/austin*.tar.xz
          tag: ${{ github.ref }}
          overwrite: true
          file_glob: true

      - name: Install Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.10'

      - name: Build wheels on ${{ matrix.arch }}
        run: |
          python3.10 -m venv .venv
          source .venv/bin/activate
          pip install --upgrade pip
          pip install -r scripts/requirements-bw.txt
          
          export VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p");

          case ${{ matrix.arch }} in
            armv7)
              PLATFORM=manylinux_2_17_armv7l.manylinux2014_armv7l
              MUSL_PLATFORM=musllinux_1_1_armv7l
              ;;
            aarch64)
              PLATFORM=manylinux_2_17_aarch64.manylinux2014_aarch64
              MUSL_PLATFORM=musllinux_1_1_aarch64
              ;;
            ppc64le)
              PLATFORM=manylinux_2_17_ppc64le.manylinux2014_ppc64le
              MUSL_PLATFORM=musllinux_1_1_ppc64le
              ;;
          esac

          python scripts/build-wheel.py \
            --version=$VERSION \
            --platform=$PLATFORM \
            --files austin:./artifacts/austin austinp:./artifacts/austinp

          python scripts/build-wheel.py \
            --version=$VERSION \
            --platform=$MUSL_PLATFORM \
            --files austin:./artifacts/austin.musl

          deactivate

      - name: Upload wheels
        run: |
          source .venv/bin/activate
          twine upload dist/*.whl --username __token__ --password ${{ secrets.PYPI_TOKEN }}s
          deactivate