smoke-extra.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. name: smoke-extra
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. types: [opened, synchronize, labeled, reopened]
  8. paths:
  9. - '.github/workflows/smoke**'
  10. - '**Makefile'
  11. - '**.go'
  12. - '**.proto'
  13. - 'go.mod'
  14. - 'go.sum'
  15. jobs:
  16. smoke-extra-libvirt:
  17. if: github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'smoke-test-extra')
  18. name: ${{ matrix.target }}
  19. runs-on: ubuntu-latest
  20. strategy:
  21. fail-fast: false
  22. matrix:
  23. target:
  24. - freebsd-amd64
  25. - openbsd-amd64
  26. - netbsd-amd64
  27. - linux-amd64-ipv6disable
  28. env:
  29. VAGRANT_DEFAULT_PROVIDER: libvirt
  30. steps:
  31. - uses: actions/checkout@v7
  32. - uses: actions/setup-go@v7
  33. with:
  34. go-version: '1.26'
  35. check-latest: true
  36. - name: add hashicorp source
  37. run: wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg && echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
  38. - name: install vagrant and libvirt
  39. run: |
  40. sudo apt-get update && sudo apt-get install -y vagrant libvirt-daemon-system libvirt-dev
  41. sudo chmod 666 /dev/kvm
  42. sudo usermod -aG libvirt $(whoami)
  43. sudo chmod 666 /var/run/libvirt/libvirt-sock
  44. vagrant plugin install vagrant-libvirt
  45. - name: ${{ matrix.target }}
  46. run: make smoke-vagrant/${{ matrix.target }}
  47. timeout-minutes: 30
  48. # linux-386 needs VirtualBox, which conflicts with KVM/libvirt -- isolated job.
  49. smoke-extra-virtualbox:
  50. if: github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'smoke-test-extra')
  51. name: linux-386
  52. runs-on: ubuntu-latest
  53. env:
  54. VAGRANT_DEFAULT_PROVIDER: virtualbox
  55. steps:
  56. - uses: actions/checkout@v7
  57. - uses: actions/setup-go@v7
  58. with:
  59. go-version: '1.26'
  60. check-latest: true
  61. - name: add hashicorp source
  62. run: wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg && echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
  63. - name: install vagrant and virtualbox
  64. run: |
  65. sudo apt-get update && sudo apt-get install -y vagrant virtualbox
  66. sudo rmmod kvm_amd kvm_intel kvm 2>/dev/null || true
  67. - name: linux-386
  68. run: make smoke-vagrant/linux-386
  69. timeout-minutes: 30
  70. smoke-windows:
  71. if: github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'smoke-test-extra')
  72. name: Run windows smoke test
  73. runs-on: windows-latest
  74. steps:
  75. - uses: actions/checkout@v7
  76. - uses: actions/setup-go@v7
  77. with:
  78. go-version: '1.26'
  79. check-latest: true
  80. # WSL2 + Ubuntu so the smoke can run a real linux peer with its own
  81. # netns. iputils-ping is needed for the in-WSL ping check. WSL1 has no
  82. # real kernel and would lack /dev/net/tun, so we have to force WSL2.
  83. - uses: Vampire/setup-wsl@v7
  84. with:
  85. distribution: Ubuntu-24.04
  86. additional-packages: iputils-ping iproute2
  87. # Vampire/setup-wsl provisions WSL1 even when the WSL2 platform is present.
  88. # Convert the distro to WSL2 explicitly before we try to use /dev/net/tun.
  89. - name: convert distro to WSL2
  90. shell: pwsh
  91. run: |
  92. wsl --set-version Ubuntu-24.04 2
  93. wsl --shutdown
  94. wsl --list --verbose
  95. - name: build windows nebula
  96. run: make bin-windows
  97. - name: build linux nebula for WSL
  98. shell: bash
  99. env:
  100. GOOS: linux
  101. GOARCH: amd64
  102. run: |
  103. mkdir -p build/linux-amd64
  104. go build -o build/linux-amd64/nebula ./cmd/nebula
  105. - name: run smoke-windows
  106. shell: pwsh
  107. working-directory: ./.github/workflows/smoke
  108. run: ./smoke-windows.ps1
  109. timeout-minutes: 15