summaryrefslogtreecommitdiffstats
path: root/.github/workflows/selfhosted.yml
blob: 2c03d148d5044e328c4e871642717ff3c03c87e4 (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
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
name: C/C++ CI self-hosted

on:
  push:
    paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ]

jobs:
  selfhosted:
    if: github.repository == 'openssh/openssh-portable-selfhosted'
    runs-on: ${{ matrix.os }}
    timeout-minutes: 600
    env:
      TARGET_HOST: ${{ matrix.os }}
    strategy:
      fail-fast: false
      # We use a matrix in two parts: firstly all of the VMs are tested with the
      # default config.  "os" corresponds to a label associated with the worker.
      matrix:
        os:
          - aix51
          - ARM
          - ARM64
          - alpine
          - debian-i386
          - debian-riscv64
          - dfly30
          - dfly48
          - dfly58
          - dfly60
          - fbsd10
          - fbsd12
          - fbsd13
          # - hurd
          - minix3
          # - nbsd2
          - nbsd3
          - nbsd4
          - nbsd8
          - nbsd9
          - obsd51
          - obsd67
          - obsd69
          - obsd70
          - obsdsnap
          - openindiana
          - openwrt-mips
          - openwrt-mipsel
          # - rocky84
          - sol10
          - sol11
          - win10
        configs:
          - default
        # Then we include any extra configs we want to test for specific VMs.
        include:
          - { os: ARM64,  configs: pam }
          - { os: debian-i386, configs: pam }
          - { os: dfly30, configs: without-openssl}
          - { os: dfly48, configs: pam }
          - { os: dfly58, configs: pam }
          - { os: dfly60, configs: pam }
          - { os: fbsd10, configs: pam }
          - { os: fbsd12, configs: pam }
          - { os: fbsd13, configs: pam }
          - { os: nbsd8,  configs: pam }
          - { os: nbsd9,  configs: pam }
          - { os: openindiana, configs: pam }
          # - { os: rocky84, configs: pam }
          - { os: sol10,  configs: pam }
          - { os: sol11,  configs: pam-krb5 }
          - { os: sol11,  configs: sol64 }
          # - { os: sol11,  configs: sol64-pam }
          - { os: win10,  configs: cygwin-release }
    steps:
    - name: shutdown VM if running
      run: vmshutdown
    - uses: actions/checkout@v2
    - name: autoreconf
      run: autoreconf
    - name: startup VM
      run: vmstartup
    - name: configure
      run: vmrun ./.github/configure.sh ${{ matrix.configs }}
    - name: save config
      uses: actions/upload-artifact@v2
      with:
        name: ${{ matrix.os }}-${{ matrix.configs }}-config
        path: config.h
    - name: make clean
      run: vmrun make clean
    - name: make
      run: vmrun make
    - name: make tests
      run: vmrun ./.github/run_test.sh ${{ matrix.configs }}
      timeout-minutes: 600
    - name: save logs
      if: failure()
      uses: actions/upload-artifact@v2
      with:
        name: ${{ matrix.os }}-${{ matrix.configs }}-logs
        path: |
          config.h
          config.log
          regress/*.log
          regress/valgrind-out/
    - name: shutdown VM
      if: always()
      run: vmshutdown