xref: /freebsd/crypto/openssh/.github/workflows/upstream.yml (revision 4d3fc8b0570b29fb0d6ee9525f104d52176ff0d4)
119261079SEd Mastename: Upstream self-hosted
219261079SEd Maste
319261079SEd Masteon:
419261079SEd Maste  push:
5f374ba41SEd Maste    branches: [ master ]
638a52bd3SEd Maste    paths: [ '**.c', '**.h', '.github/**' ]
719261079SEd Maste
819261079SEd Mastejobs:
919261079SEd Maste  selfhosted:
1019261079SEd Maste    if: github.repository == 'openssh/openssh-portable-selfhosted'
11f374ba41SEd Maste    runs-on: 'libvirt'
1219261079SEd Maste    env:
13f374ba41SEd Maste      HOST: 'libvirt'
14f374ba41SEd Maste      TARGET_HOST: ${{ matrix.target }}
15f374ba41SEd Maste      TARGET_CONFIG: ${{ matrix.config }}
1619261079SEd Maste    strategy:
1719261079SEd Maste      fail-fast: false
1819261079SEd Maste      matrix:
19f374ba41SEd Maste        target: [ obsdsnap, obsdsnap-i386 ]
20f374ba41SEd Maste        config: [ default, without-openssl, ubsan ]
2119261079SEd Maste    steps:
2219261079SEd Maste    - name: shutdown VM if running
2319261079SEd Maste      run: vmshutdown
24f374ba41SEd Maste      working-directory: ${{ runner.temp }}
25f374ba41SEd Maste    - uses: actions/checkout@main
2619261079SEd Maste    - name: startup VM
2719261079SEd Maste      run: vmstartup
28f374ba41SEd Maste      working-directory: ${{ runner.temp }}
2919261079SEd Maste    - name: update source
3019261079SEd Maste      run: vmrun "cd /usr/src && cvs up -dPA usr.bin/ssh regress/usr.bin/ssh"
3119261079SEd Maste    - name: make clean
32f374ba41SEd Maste      run: vmrun "cd /usr/src/usr.bin/ssh && make obj && make clean && cd /usr/src/regress/usr.bin/ssh && make obj && make clean && sudo chmod -R g-w /usr/src /usr/obj"
3319261079SEd Maste    - name: make
34f374ba41SEd Maste      run: vmrun "cd /usr/src/usr.bin/ssh && case ${{ matrix.config }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac"
3519261079SEd Maste    - name: make install
3619261079SEd Maste      run: vmrun "cd /usr/src/usr.bin/ssh && sudo make install"
3738a52bd3SEd Maste    - name: make tests`
38f374ba41SEd Maste      run: vmrun "cd /usr/src/regress/usr.bin/ssh && case ${{ matrix.config }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac"
3938a52bd3SEd Maste      env:
4038a52bd3SEd Maste        SUDO: sudo
411323ec57SEd Maste      timeout-minutes: 300
4219261079SEd Maste    - name: save logs
4319261079SEd Maste      if: failure()
44f374ba41SEd Maste      uses: actions/upload-artifact@main
4519261079SEd Maste      with:
46f374ba41SEd Maste        name: ${{ matrix.target }}-${{ matrix.config }}-logs
4719261079SEd Maste        path: |
48f374ba41SEd Maste          /usr/obj/regress/usr.bin/ssh/obj/*.log
49*4d3fc8b0SEd Maste          /usr/obj/regress/usr.bin/ssh/obj/log/*
5019261079SEd Maste    - name: shutdown VM
5119261079SEd Maste      if: always()
5219261079SEd Maste      run: vmshutdown
53f374ba41SEd Maste      working-directory: ${{ runner.temp }}
54