File: ci.yml

package info (click to toggle)
libisal 2.31.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,780 kB
  • sloc: asm: 44,577; ansic: 42,149; sh: 915; makefile: 619; pascal: 345
file content (128 lines) | stat: -rw-r--r-- 3,937 bytes parent folder | download | duplicates (2)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Continous integration

on:
  pull_request:
  push:
    branches:
      - master
    tags:
      - "*"

permissions:
  contents: read

jobs:
  check_format:
    env:
      CLANGFORMAT: clang-format-18
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2.3.4
        with:
          fetch-depth: 2
      - name: Install clang-format-18
        run: |
          wget https://apt.llvm.org/llvm.sh
          chmod +x llvm.sh
          sudo ./llvm.sh 18
          sudo apt install -y clang-format-18
      - name: Run format check
        run: bash tools/check_format.sh

  run_tests_unix:
    needs: check_format
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - macos-13  # x86_64
          - macos-14  # arm64
        assembler:
          - nasm
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2.3.4
      - name: Install build dependencies (Linux)
        run: sudo apt install ${{ matrix.assembler }}
        if: runner.os == 'Linux'
      - name: Install build dependencies (Macos)
        run: brew install ${{ matrix.assembler }} automake autoconf coreutils libtool
        if: runner.os == 'macOS'
      - name: Build
        run: |
          ./autogen.sh
          ./configure
          bash -c 'make -j $(nproc)'
      - name: Run tests
        run: bash tools/test_checks.sh
      - name: Run extended tests
        run: bash tools/test_extended.sh

  run_tests_mingw_linux_64:
    needs: check_format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2.3.4
      - name: Install build dependencies (Linux)
        run: sudo apt install nasm mingw-w64
      - name: Build
        shell: bash
        run: |
          make -j $(nproc) -f Makefile.unx programs/igzip tests arch=mingw host_cpu=x86_64
      # wine does not seem available, hence cannot run tests.

  run_tests_mingw_linux_32:
    needs: check_format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2.3.4
      - name: Install build dependencies (Linux)
        run: sudo apt install nasm mingw-w64
      - name: Build
        shell: bash
        run: |
          make -j $(nproc) -f Makefile.unx programs/igzip tests arch=mingw host_cpu=base_aliases CC=i686-w64-mingw32-gcc

  run_tests_mingw_windows_64:
    needs: check_format
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2.3.4
      - name: Install nasm
        uses: ilammy/setup-nasm@v1.2.0
      - name: Build
        shell: bash
        run: |
          make -j $(nproc) -f Makefile.unx programs/igzip tests SIM= arch=mingw host_cpu=x86_64 AR=x86_64-w64-mingw32-gcc-ar
      - name: Run tests
        shell: bash
        run: |
          # autoconf is missing, hence simulates test_checks.sh
          make -j $(nproc) -f Makefile.unx check D=TEST_SEED=0 SIM= arch=mingw host_cpu=x86_64 AR=x86_64-w64-mingw32-gcc-ar
      - name: Run extended tests
        shell: bash
        run: |
          # simulates test_extended.sh
          make -j $(nproc) -f Makefile.unx perf D=TEST_SEED=0 SIM= arch=mingw host_cpu=x86_64 AR=x86_64-w64-mingw32-gcc-ar
          make -j $(nproc) -f Makefile.unx test D=TEST_SEED=0 SIM= arch=mingw host_cpu=x86_64 AR=x86_64-w64-mingw32-gcc-ar

  # seems like i686-w64-mingw32-gcc is not available on windows runner.

  run_tests_windows:
    needs: check_format
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2.3.4
      - name: Set MSVC developer prompt
        uses: ilammy/msvc-dev-cmd@v1.6.0
      - name: Install nasm
        uses: ilammy/setup-nasm@v1.2.0
      - name: Build
        run: |
          nmake -f Makefile.nmake || exit /b 1
          nmake checks -f Makefile.nmake || exit /b 1
          nmake perfs -f Makefile.nmake || exit /b 1
      - name: Run perf apps
        run: nmake perf -f Makefile.nmake || exit /b 1
      - name: Run checks
        run: nmake check -f Makefile.nmake || exit /b 1