aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/nx-libs-archs.yml
blob: 74936aa12f32154fa733000d8ac715e20649e3ee (plain)
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
name: nx-libs CI diff archs

on:
  push:
    branches: [ 3.6.x ]
  pull_request:
    branches: [ 3.6.x ]

jobs:
  build:
    runs-on: ubuntu-22.04
    name: Build on ${{ matrix.distro }} ${{ matrix.arch }} with gcc

    # Run steps on a matrix of 4 arch/distro combinations
    strategy:
      fail-fast: false
      matrix:
        include:
          - arch: aarch64
            distro: ubuntu22.04
          - arch: ppc64le
            distro: ubuntu22.04
          - arch: s390x
            distro: ubuntu22.04
          - arch: armv7
            distro: ubuntu22.04

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - uses: uraimo/run-on-arch-action@v2.7.2
        name: Build artifact
        id: build
        with:
          arch: ${{ matrix.arch }}
          distro: ${{ matrix.distro }}

          # Not required, but speeds up builds
          githubToken: ${{ github.token }}

          # Pass some environment variables to the container
          env: |
            CC: gcc
            CXX: g++
            DEBIAN_FRONTEND: noninteractive

          # 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: |
            case "${{ matrix.distro }}" in
              ubuntu*)
                cat /etc/debian_version
                apt-get update -q -y
                apt-get install -q -y gcc g++
                gcc --version
                # basic packages
                apt-get install -q -y \
                  autoconf libtool make pkg-config
                # imake deps
                apt-get install -q -y \
                  libxkbfile-dev xfonts-utils xutils-dev
                # X11 libraries deps
                apt-get install -q -y \
                  libpixman-1-dev libjpeg-dev libxcomposite-dev libxdamage-dev \
                  libxml2-dev libxfont-dev libxinerama-dev libxpm-dev libxrandr-dev \
                  libxtst-dev x11proto-fonts-dev
                # soft requirements
                apt-get install -q -y \
                  quilt x11-xkb-utils
                ;;
            esac

          run: |
            make