diff options
author | Ilya Maximets <i.maximets@ovn.org> | 2020-11-23 23:34:28 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2020-11-26 19:10:07 +0100 |
commit | c2b965c927cabeb240c0f1fe294a60dca686ad60 (patch) | |
tree | bbaeefba2ca2dea73b4a395bda06ff7859cd560e | |
parent | 769befd131b9f056fbd2a1307957a2d7419b29f9 (diff) | |
download | openvswitch-c2b965c927cabeb240c0f1fe294a60dca686ad60.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.
.travis folder renamed to .ci to highlight that it used not only for
Travis CI. Travis CI support will be completely removed soon.
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>
-rwxr-xr-x | .ci/linux-build.sh (renamed from .travis/linux-build.sh) | 0 | ||||
-rwxr-xr-x | .ci/linux-prepare.sh (renamed from .travis/linux-prepare.sh) | 0 | ||||
-rwxr-xr-x | .ci/osx-build.sh (renamed from .travis/osx-build.sh) | 2 | ||||
-rwxr-xr-x | .ci/osx-prepare.sh (renamed from .travis/osx-prepare.sh) | 0 | ||||
-rw-r--r-- | .github/workflows/build-and-test.yml | 138 | ||||
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | CONTRIBUTING.md | 9 | ||||
-rw-r--r-- | Makefile.am | 9 | ||||
-rw-r--r-- | README.md | 2 |
9 files changed, 151 insertions, 13 deletions
diff --git a/.travis/linux-build.sh b/.ci/linux-build.sh index 21e4a2091..21e4a2091 100755 --- a/.travis/linux-build.sh +++ b/.ci/linux-build.sh diff --git a/.travis/linux-prepare.sh b/.ci/linux-prepare.sh index 7402ec0db..7402ec0db 100755 --- a/.travis/linux-prepare.sh +++ b/.ci/linux-prepare.sh diff --git a/.travis/osx-build.sh b/.ci/osx-build.sh index 4db9c8d04..7383451ba 100755 --- a/.travis/osx-build.sh +++ b/.ci/osx-build.sh @@ -2,7 +2,7 @@ set -o errexit -CFLAGS="-Werror -Wno-error=format $CFLAGS" +CFLAGS="-Werror -Wno-error=format -Wno-cast-align $CFLAGS" EXTRA_OPTS="" function configure_ovs() diff --git a/.travis/osx-prepare.sh b/.ci/osx-prepare.sh index ae0771867..ae0771867 100755 --- a/.travis/osx-prepare.sh +++ b/.ci/osx-prepare.sh diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 000000000..b30eb4d08 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,138 @@ +name: Build and Test + +on: [push, pull_request] + +jobs: + build-linux: + env: + dependencies: | + automake libtool gcc bc libjemalloc1 libjemalloc-dev \ + libssl-dev llvm-dev gcc-multilib + CC: ${{ matrix.compiler }} + DPDK: ${{ matrix.dpdk }} + 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.7.2', '4.4.15', '4.1.28', '3.18.37', + '3.14.73', '3.12.61', '3.10.102'] + opts: [''] + testsuite: [''] + dpdk: [''] + build_env: [''] + include: + - compiler: gcc + opts: --disable-ssl + - compiler: clang + opts: --disable-ssl + + - compiler: gcc + testsuite: test + kernel: 3.18.1 + - compiler: clang + testsuite: test + kernel: 3.18.1 + + - 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.17.7 + - compiler: clang + dpdk: dpdk + kernel: 3.17.7 + + - compiler: gcc + dpdk: dpdk + kernel: 3.17.7 + opts: --enable-shared + - compiler: clang + dpdk: dpdk + kernel: 3.17.7 + 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: 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 diff --git a/.travis.yml b/.travis.yml index 8770882f4..ddc968dd7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ addons: - libjemalloc1 - libjemalloc-dev -before_install: ./.travis/${TRAVIS_OS_NAME}-prepare.sh +before_install: ./.ci/${TRAVIS_OS_NAME}-prepare.sh before_script: export PATH=$PATH:$HOME/bin @@ -42,7 +42,7 @@ matrix: compiler: clang env: OPTS="--disable-ssl" -script: ./.travis/${TRAVIS_OS_NAME}-build.sh $OPTS +script: ./.ci/${TRAVIS_OS_NAME}-build.sh $OPTS notifications: email: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 68442d248..aee99ac68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,11 +47,10 @@ Testing is also important: - A patch that modifies xenserver code should be tested on XenServer before submission. -If you are using GitHub, then you may utilize the travis-ci.org CI build -system by linking your GitHub repository to it. This will run some of -the above tests automatically when you push changes to your repository. -See the "Continuous Integration with Travis-CI" in the [INSTALL.md] file -for details on how to set it up. +If you are using GitHub, then you may utilize the travis-ci.org and the GitHub +Actions CI build systems. They will run some of the above tests automatically +when you push changes to your repository. See the "Continuous Integration with +Travis-CI" in the [INSTALL.md] file for details on how to set it up. Email Subject ------------- diff --git a/Makefile.am b/Makefile.am index f4fc00a05..c3d7469fb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -98,11 +98,12 @@ docs = \ EXTRA_DIST = \ $(docs) \ NOTICE \ + .ci/linux-build.sh \ + .ci/linux-prepare.sh \ + .ci/osx-build.sh \ + .ci/osx-prepare.sh \ + .github/workflows/build-and-test.yml \ .travis.yml \ - .travis/linux-build.sh \ - .travis/linux-prepare.sh \ - .travis/osx-build.sh \ - .travis/osx-prepare.sh \ appveyor.yml \ boot.sh \ build-aux/cccl \ @@ -4,7 +4,7 @@ Open vSwitch Build Status: ------------- -[![Build Status](https://travis-ci.org/openvswitch/ovs.png)](https://travis-ci.org/openvswitch/ovs) +![Build and Test](https://github.com/openvswitch/ovs/workflows/Build%20and%20Test/badge.svg) What is Open vSwitch? --------------------- |