From 96217a2fdeebca05498032b2420e02f8abb72f0a Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Sun, 11 Dec 2022 06:16:20 +0000 Subject: [PATCH 01/10] create job to build linux and run unit test on s390x --- .github/workflows/build.yml | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40a9e3edef8..574ff309a78 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,6 +63,28 @@ jobs: id: hash-gcc run: echo "::set-output name=hashes::$(sha256sum Linux.flatc.binary.${{ matrix.cxx }}.zip | base64 -w0)" + build-linux-s390x: + name: Build Linux on s390x arch + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: uraimo/run-on-arch-action@v2 + name: Run commands + id: runcmd + with: + arch: s390x + distro: ubuntu_latest + install: | + apt-get update -q -y + apt-get install make + run: | + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release + make -j + ./flattests + + + + build-linux-cpp-std: name: Build Linux C++ runs-on: ubuntu-latest @@ -79,8 +101,8 @@ jobs: - uses: actions/checkout@v3 - name: cmake run: > - CXX=${{ matrix.cxx }} cmake -G "Unix Makefiles" - -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_STRICT_MODE=ON + CXX=${{ matrix.cxx }} cmake -G "Unix Makefiles" + -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_STRICT_MODE=ON -DFLATBUFFERS_CPP_STD=${{ matrix.std }} -DFLATBUFFERS_BUILD_CPP17=${{ matrix.std >= 17 && 'On' || 'Off'}} - name: build @@ -104,8 +126,8 @@ jobs: uses: microsoft/setup-msbuild@v1.1 - name: cmake run: > - cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release - -DFLATBUFFERS_STRICT_MODE=ON + cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release + -DFLATBUFFERS_STRICT_MODE=ON -DFLATBUFFERS_CPP_STD=${{ matrix.std }} -DFLATBUFFERS_BUILD_CPP17=${{ matrix.std >= 17 && 'On' || 'Off'}} - name: build @@ -121,7 +143,7 @@ jobs: contents: write outputs: digests: ${{ steps.hash.outputs.hashes }} - name: Build Windows 2019 + name: Build Windows 2019 runs-on: windows-2019 steps: - uses: actions/checkout@v3 @@ -190,7 +212,7 @@ jobs: matrix: configuration: [ '', - '-p:UnsafeByteBuffer=true', + '-p:UnsafeByteBuffer=true', # Fails two tests currently. #'-p:EnableSpanT=true,UnsafeByteBuffer=true' ] @@ -198,7 +220,7 @@ jobs: - uses: actions/checkout@v3 - name: Setup .NET Core SDK uses: actions/setup-dotnet@v3 - with: + with: dotnet-version: '3.1.x' - name: Build run: | From d9ef41a7562206a30597e4944c649dcb8f5f979d Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Sun, 11 Dec 2022 06:23:01 +0000 Subject: [PATCH 02/10] update --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 574ff309a78..5836afefe09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,6 +76,7 @@ jobs: distro: ubuntu_latest install: | apt-get update -q -y + apt-get install cmake apt-get install make run: | cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release From 366bd40d915d1808e3cf62d35e9bdc836d7581ef Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Sun, 11 Dec 2022 06:28:52 +0000 Subject: [PATCH 03/10] update --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5836afefe09..2365ea24f7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,8 +76,8 @@ jobs: distro: ubuntu_latest install: | apt-get update -q -y - apt-get install cmake - apt-get install make + apt-get -y install cmake + apt-get -y install make run: | cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release make -j From 8d7c8bdb5aef2655221fcecc2bba40e7b6f92989 Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Sun, 11 Dec 2022 06:37:53 +0000 Subject: [PATCH 04/10] update --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2365ea24f7e..5c22268d42e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,6 +78,7 @@ jobs: apt-get update -q -y apt-get -y install cmake apt-get -y install make + apt-get -y install g++ run: | cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release make -j From f101656a4a2758f26b033e14ac1cabf8493ef449 Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Sun, 11 Dec 2022 23:52:23 +0000 Subject: [PATCH 05/10] update --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c22268d42e..2882b2857dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,9 +84,6 @@ jobs: make -j ./flattests - - - build-linux-cpp-std: name: Build Linux C++ runs-on: ubuntu-latest From 82505295ca7b8e4bfedb5eedcf6024e9c191ebed Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Mon, 12 Dec 2022 00:40:36 +0000 Subject: [PATCH 06/10] update --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2882b2857dc..aecfb899ba5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,7 +64,7 @@ jobs: run: echo "::set-output name=hashes::$(sha256sum Linux.flatc.binary.${{ matrix.cxx }}.zip | base64 -w0)" build-linux-s390x: - name: Build Linux on s390x arch + name: Build Linux on S390X Arch runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 95dd59d3175131316e117217031e1354467dc6e8 Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Tue, 13 Dec 2022 06:01:08 +0000 Subject: [PATCH 07/10] print out machine type --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aecfb899ba5..639485f1d43 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,6 +80,7 @@ jobs: apt-get -y install make apt-get -y install g++ run: | + lscpu | grep Endian cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release make -j ./flattests From 5c628b5f890405822c5c77bcb6fc76eed012fbce Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Tue, 13 Dec 2022 07:07:27 +0000 Subject: [PATCH 08/10] create regression test to build a big endian arch and run unit tests daily --- .github/workflows/build.yml | 22 ---------------------- .github/workflows/regression.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/regression.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 639485f1d43..8fdaeb52f4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,28 +63,6 @@ jobs: id: hash-gcc run: echo "::set-output name=hashes::$(sha256sum Linux.flatc.binary.${{ matrix.cxx }}.zip | base64 -w0)" - build-linux-s390x: - name: Build Linux on S390X Arch - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: uraimo/run-on-arch-action@v2 - name: Run commands - id: runcmd - with: - arch: s390x - distro: ubuntu_latest - install: | - apt-get update -q -y - apt-get -y install cmake - apt-get -y install make - apt-get -y install g++ - run: | - lscpu | grep Endian - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release - make -j - ./flattests - build-linux-cpp-std: name: Build Linux C++ runs-on: ubuntu-latest diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml new file mode 100644 index 00000000000..c20d55aa4f2 --- /dev/null +++ b/.github/workflows/regression.yml @@ -0,0 +1,30 @@ +name: Regression tests +permissions: read-all + +on: + schedule: + - cron: "30 20 * * *" + +jobs: + build-linux-s390x: + name: Build Linux on S390X Arch and run unit tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: uraimo/run-on-arch-action@v2 + name: Run commands + id: runcmd + with: + arch: s390x + distro: ubuntu_latest + install: | + apt-get update -q -y + apt-get -y install cmake + apt-get -y install make + apt-get -y install g++ + run: | + lscpu | grep Endian + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release + make -j + ./flattests + From 95353636f54b06b601b0f2e68e1bb1e142edc5e0 Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Tue, 13 Dec 2022 07:33:38 +0000 Subject: [PATCH 09/10] rename and schedule run on pr merged and on request --- .github/workflows/{regression.yml => extrabuild.yml} | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) rename .github/workflows/{regression.yml => extrabuild.yml} (76%) diff --git a/.github/workflows/regression.yml b/.github/workflows/extrabuild.yml similarity index 76% rename from .github/workflows/regression.yml rename to .github/workflows/extrabuild.yml index c20d55aa4f2..5246435ae70 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/extrabuild.yml @@ -1,13 +1,18 @@ -name: Regression tests +name: Build and unit tests that are more time consuming permissions: read-all on: + # For manual tests. + workflow_dispatch: + pull_request: + types: + - closed schedule: - cron: "30 20 * * *" jobs: build-linux-s390x: - name: Build Linux on S390X Arch and run unit tests + name: Build Linux on s390x arch and run unit tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 070256d198783210b2cda8254bc33d4e93e18109 Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Tue, 13 Dec 2022 07:41:17 +0000 Subject: [PATCH 10/10] udpate --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fdaeb52f4f..40a9e3edef8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,8 +79,8 @@ jobs: - uses: actions/checkout@v3 - name: cmake run: > - CXX=${{ matrix.cxx }} cmake -G "Unix Makefiles" - -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_STRICT_MODE=ON + CXX=${{ matrix.cxx }} cmake -G "Unix Makefiles" + -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_STRICT_MODE=ON -DFLATBUFFERS_CPP_STD=${{ matrix.std }} -DFLATBUFFERS_BUILD_CPP17=${{ matrix.std >= 17 && 'On' || 'Off'}} - name: build @@ -104,8 +104,8 @@ jobs: uses: microsoft/setup-msbuild@v1.1 - name: cmake run: > - cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release - -DFLATBUFFERS_STRICT_MODE=ON + cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release + -DFLATBUFFERS_STRICT_MODE=ON -DFLATBUFFERS_CPP_STD=${{ matrix.std }} -DFLATBUFFERS_BUILD_CPP17=${{ matrix.std >= 17 && 'On' || 'Off'}} - name: build @@ -121,7 +121,7 @@ jobs: contents: write outputs: digests: ${{ steps.hash.outputs.hashes }} - name: Build Windows 2019 + name: Build Windows 2019 runs-on: windows-2019 steps: - uses: actions/checkout@v3 @@ -190,7 +190,7 @@ jobs: matrix: configuration: [ '', - '-p:UnsafeByteBuffer=true', + '-p:UnsafeByteBuffer=true', # Fails two tests currently. #'-p:EnableSpanT=true,UnsafeByteBuffer=true' ] @@ -198,7 +198,7 @@ jobs: - uses: actions/checkout@v3 - name: Setup .NET Core SDK uses: actions/setup-dotnet@v3 - with: + with: dotnet-version: '3.1.x' - name: Build run: |