Signed-off-by: Mark Michelson <[email protected]>
---
This patch is based on the "Include OVS as a git submodule." patch,
which, at this time has not been merged into OVN master yet.
---
 .github/workflows/weekly.yml | 147 +++++++++++++++++++++++++++++++++++
 Makefile.am                  |   1 +
 2 files changed, 148 insertions(+)
 create mode 100644 .github/workflows/weekly.yml

diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml
new file mode 100644
index 000000000..60b81ce95
--- /dev/null
+++ b/.github/workflows/weekly.yml
@@ -0,0 +1,147 @@
+name: Weekly Jobs
+
+on:
+  schedule:
+    # Run Sunday at midnight
+    - cron: '0 0 * * 0'
+
+# XXX Github actions provides no way
+# of creating template yaml files to be
+# included for multiple pipelines. Most
+# of the below code is copied directly
+# from test.yml. If Github ever provides
+# support for importing yaml or defining
+# templates, this repeated code could be
+# refactored.
+
+jobs:
+  build-linux-ovs-master:
+    env:
+      dependencies: |
+        automake libtool gcc bc libjemalloc1 libjemalloc-dev    \
+        libssl-dev llvm-dev libelf-dev libnuma-dev libpcap-dev  \
+        python3-openssl python3-pip python3-sphinx              \
+        selinux-policy-dev
+      m32_dependecies: gcc-multilib
+      CC:          ${{ matrix.compiler }}
+      LIBS:        ${{ matrix.libs }}
+      M32:         ${{ matrix.m32 }}
+      OPTS:        ${{ matrix.opts }}
+      TESTSUITE:   ${{ matrix.testsuite }}
+      ASAN:        ${{ matrix.asan }}
+
+    name: linux ${{ join(matrix.*, ' ') }}
+    runs-on: ubuntu-18.04
+
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - compiler:     gcc
+            opts:         --disable-ssl
+          - compiler:     clang
+            opts:         --disable-ssl
+
+          - compiler:     gcc
+            testsuite:    test
+          - compiler:     clang
+            testsuite:    test
+            asan:         asan
+
+          - compiler:     gcc
+            testsuite:    test
+            libs:         -ljemalloc
+          - compiler:     clang
+            testsuite:    test
+            libs:         -ljemalloc
+
+          - compiler:     gcc
+            m32:          m32
+            opts:         --disable-ssl
+
+    steps:
+    - name: checkout
+      uses: actions/checkout@v2
+
+    # Check out OVS master into the location where the submodule
+    # would be in order to use it in builds.
+    - name: checkout OVS
+      uses: actions/checkout@v2
+      with:
+        repository: 'openvswitch/ovs'
+        path: 'ovs'
+        ref: 'master'
+
+    - name: update APT cache
+      run:  sudo apt update
+
+    - name: install required dependencies
+      run:  sudo apt install -y ${{ env.dependencies }}
+
+    - name: install libunbound libunwind
+      if:   matrix.m32 == ''
+      run:  sudo apt install -y libunbound-dev libunwind-dev
+
+    - name: install 32-bit dependencies
+      if:   matrix.m32 != ''
+      run:  sudo apt install -y ${{ env.m32_dependecies }}
+
+    - name: prepare
+      run:  ./.ci/linux-prepare.sh
+
+    - name: build
+      run:  PATH="$PATH:$HOME/bin" ./.ci/linux-build.sh
+
+    - 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-ovs-master:
+    env:
+      CC:    clang
+      OPTS:  --disable-ssl
+
+    name:    osx clang --disable-ssl
+    runs-on: macos-latest
+
+    strategy:
+      fail-fast: false
+
+    steps:
+    - name: checkout
+      uses: actions/checkout@v2
+    # Check out OVS master into the location where the submodule
+    # would be in order to use it in builds.
+    - name: checkout OVS
+      uses: actions/checkout@v2
+      with:
+        repository: 'openvswitch/ovs'
+        path: 'ovs'
+        ref: 'master'
+    - 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/Makefile.am b/Makefile.am
index 50376a1b6..c516dd473 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -91,6 +91,7 @@ EXTRA_DIST = \
        .ci/osx-build.sh \
        .ci/osx-prepare.sh \
        .github/workflows/test.yml \
+       .github/workflows/weekly.yml \
        boot.sh \
        $(MAN_FRAGMENTS) \
        $(MAN_ROOTS) \
-- 
2.29.2

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to