File: build_arm.yaml

package info (click to toggle)
mfgtools 1.5.239-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,296 kB
  • sloc: cpp: 10,087; javascript: 546; python: 335; sh: 85; xml: 53; makefile: 18
file content (94 lines) | stat: -rw-r--r-- 2,934 bytes parent folder | download
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
89
90
91
92
93
94
name: Build for arm ubuntu

on:
  push:
    branches:
      - master
    tags:
      - uuu*
  pull_request:
    types:
      - opened
      - synchronize

jobs:
  build_job:
    # The host should always be linux
    runs-on: ubuntu-latest
    name: Build on ${{ matrix.distro }} ${{ matrix.arch }}

    # Run steps on a matrix of 4 arch/distro combinations
    strategy:
      matrix:
        include:
          - arch: aarch64
            distro: ubuntu22.04
          - arch: armv7
            distro: ubuntu22.04
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
          submodules: true

      - name: git fetch tags
        run: |
          git fetch --tags --force # Retrieve annotated tags. #issue 290

      - 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
          githubToken: ${{ github.token }}

          # Mount the artifacts directory as /artifacts in the container
          dockerRunArgs: |
            --volume "${PWD}:/mfgtools"

          # Pass some environment variables to the container
          env: | # YAML, but pipe character is necessary
            artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}

          # The shell to run commands with in the container
          shell: /bin/sh

          # Install some dependencies in the container. This speeds up builds if
          # you are also using githubToken. Any dependencies installed here will
          # be part of the container image that gets cached, so subsequent
          # builds don't have to re-install them. The image layer is cached
          # publicly in your project's package repository, so it is vital that
          # no secrets are present in the container state or logs.
          install: apt-get update -q -y; apt-get install -q -y libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++ zlib1g-dev git libtinyxml2-dev

          # Produce a binary artifact and place it in the mounted volume
          run: |
            git config --global --add safe.directory /mfgtools
            cd /mfgtools/tinyxml2; cmake .; make;
            cd /mfgtools
            cmake -D 'STATIC=1' .
            make

      - name: Rename
        run: cp uuu/uuu uuu_${{ matrix.arch }}

      - name: Upload Build Artifacts
        uses: actions/upload-artifact@v4
        with:
          name: uuu_${{ matrix.arch }}
          path: uuu_${{ matrix.arch }}

      - name: Create or Update Release
        if: github.ref_type == 'tag'
        uses: ncipollo/release-action@v1
        with:
          name: Release ${{ github.ref_name }}
          tag: ${{ github.ref_name }}
          commit: ${{ github.sha }}
          allowUpdates: true
          prerelease: true
          artifacts: "uuu_${{ matrix.arch }}"