summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2020-11-23 23:34:28 +0100
committerIlya Maximets <i.maximets@ovn.org>2020-11-26 19:07:31 +0100
commit335b26cb60afc67552faf084431e56eed1e7540a (patch)
tree3aaebe39409ef2c99678750c7bd61f23dbb69079 /.github
parentcde7a4de74d26fb37d322643f681ba6ba2034abe (diff)
downloadopenvswitch-335b26cb60afc67552faf084431e56eed1e7540a.tar.gz
github: Add GitHub Actions workflow.
This is an initial version of GitHub Actions support. It mostly mimics our current Travis CI build matrix with slight differences. Minor difference that we can not install 32-bit versions of libunbound since it is not avaialble in repository. .travis folder renamed to .ci to highlight that it used not only for Travis CI. Travis CI support will be completely removed by the next patch. What happened to Travis CI: https://mail.openvswitch.org/pipermail/ovs-dev/2020-November/377773.html Acked-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-and-test.yml143
1 files changed, 143 insertions, 0 deletions
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
new file mode 100644
index 000000000..85ed2efcd
--- /dev/null
+++ b/.github/workflows/build-and-test.yml
@@ -0,0 +1,143 @@
+name: Build and Test
+
+on: [push, pull_request]
+
+jobs:
+ build-linux:
+ env:
+ dependencies: |
+ automake libtool gcc bc libjemalloc1 libjemalloc-dev \
+ libssl-dev llvm-dev libelf-dev libnuma-dev \
+ python-sphinx selinux-policy-dev gcc-multilib
+ CC: ${{ matrix.compiler }}
+ DPDK: ${{ matrix.dpdk }}
+ DPDK_SHARED: ${{ matrix.dpdk_shared }}
+ KERNEL: ${{ matrix.kernel }}
+ LIBS: ${{ matrix.libs }}
+ BUILD_ENV: ${{ matrix.build_env }}
+ OPTS: ${{ matrix.opts }}
+ TESTSUITE: ${{ matrix.testsuite }}
+
+ name: linux ${{ join(matrix.*, ' ') }}
+ runs-on: ubuntu-16.04
+ timeout-minutes: 30
+
+ strategy:
+ fail-fast: false
+ matrix:
+ compiler: [gcc, clang]
+ kernel: ['4.15.18', '4.14.111', '4.9.149', '4.4.148', '3.16.57']
+ opts: ['']
+ testsuite: ['']
+ dpdk: ['']
+ dpdk_shared: ['']
+ build_env: ['']
+ include:
+ - compiler: gcc
+ opts: --disable-ssl
+ - compiler: clang
+ opts: --disable-ssl
+
+ - compiler: gcc
+ testsuite: test
+ kernel: 3.16.54
+ - compiler: clang
+ testsuite: test
+ kernel: 3.16.54
+
+ - compiler: gcc
+ testsuite: test
+ opts: --enable-shared
+ - compiler: clang
+ testsuite: test
+ opts: --enable-shared
+
+ - compiler: gcc
+ testsuite: test
+ libs: -ljemalloc
+ - compiler: clang
+ testsuite: test
+ libs: -ljemalloc
+
+ - compiler: gcc
+ dpdk: dpdk
+ kernel: 3.16.54
+ - compiler: clang
+ dpdk: dpdk
+ kernel: 3.16.54
+
+ - compiler: gcc
+ dpdk: dpdk
+ kernel: 3.16.54
+ opts: --enable-shared
+ - compiler: clang
+ dpdk: dpdk
+ kernel: 3.16.54
+ opts: --enable-shared
+
+ - compiler: gcc
+ build_env: -m32
+ opts: --disable-ssl
+
+ steps:
+ - name: checkout
+ uses: actions/checkout@v2
+
+ - name: install common dependencies
+ run: sudo apt install -y ${{ env.dependencies }}
+ - name: install libunbound
+ if: matrix.build_env == ''
+ run: sudo apt install -y libunbound-dev
+
+ - name: prepare
+ run: ./.ci/linux-prepare.sh
+
+ - name: build
+ run: PATH="$PATH:$HOME/bin" ./.ci/linux-build.sh ${{ env.OPTS }}
+
+ - name: copy logs on failure
+ if: failure() || cancelled()
+ run: |
+ # upload-artifact@v2 throws exceptions if it tries to upload socket
+ # files and we could have some socket files in testsuite.dir.
+ # Also, upload-artifact@v2 doesn't work well enough with wildcards.
+ # So, we're just archiving everything here to avoid any issues.
+ mkdir logs
+ cp config.log ./logs/
+ cp -r ./*/_build/sub/tests/testsuite.* ./logs/ || true
+ tar -czvf logs.tgz logs/
+
+ - name: upload logs on failure
+ if: failure() || cancelled()
+ uses: actions/upload-artifact@v2
+ with:
+ name: logs-linux-${{ join(matrix.*, '-') }}
+ path: logs.tgz
+
+ build-osx:
+ env:
+ CC: clang
+ OPTS: --disable-ssl
+
+ name: osx clang --disable-ssl
+ runs-on: macos-latest
+ timeout-minutes: 30
+
+ strategy:
+ fail-fast: false
+
+ steps:
+ - name: checkout
+ uses: actions/checkout@v2
+ - name: install dependencies
+ run: brew install automake libtool
+ - name: prepare
+ run: ./.ci/osx-prepare.sh
+ - name: build
+ run: PATH="$PATH:$HOME/bin" ./.ci/osx-build.sh
+ - name: upload logs on failure
+ if: failure()
+ uses: actions/upload-artifact@v2
+ with:
+ name: logs-osx-clang---disable-ssl
+ path: config.log