From 6b958673845e22dbdcd3c96dba222d022da1500b Mon Sep 17 00:00:00 2001 From: Maksim Kokryashkin Date: Fri, 3 Nov 2023 17:06:46 +0300 Subject: [PATCH] exp --- .github/workflows/auto-pr.yml | 30 +++++ .github/workflows/coverage.yml | 64 ---------- .github/workflows/exotic-builds-testing.yml | 82 ------------- .github/workflows/gnumake-builds-testing.yml | 94 --------------- .github/workflows/lint.yml | 54 --------- .github/workflows/sanitizers-testing.yml | 91 -------------- .github/workflows/testing.yml | 119 ------------------- 7 files changed, 30 insertions(+), 504 deletions(-) create mode 100644 .github/workflows/auto-pr.yml delete mode 100644 .github/workflows/coverage.yml delete mode 100644 .github/workflows/exotic-builds-testing.yml delete mode 100644 .github/workflows/gnumake-builds-testing.yml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/sanitizers-testing.yml delete mode 100644 .github/workflows/testing.yml diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml new file mode 100644 index 0000000000..e771ca8ead --- /dev/null +++ b/.github/workflows/auto-pr.yml @@ -0,0 +1,30 @@ +name: Create PR with submodule bump in tarantool repo + +on: + push: + branches-ignore: + - '**-notest' + - 'upstream-**' + - '**-nopr' + tags-ignore: + - '**' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + repository: ${{ github.event.pusher.name }}/tarantool + submodules: recursive + - shell: bash + run: | + cd third_party/luajit/ + echo $PWD + git fetch origin ${{ github.ref_name }} + git checkout ${{ github.ref_name }} + cd ../.. + git add third_party/luajit + git commit -m "luajit: bump submodule" + git push origin ${{ github.ref_name }} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 89571361bd..0000000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Code coverage - -on: - push: - branches-ignore: - - '**-notest' - - 'upstream-**' - tags-ignore: - - '**' - -concurrency: - # An update of a developer branch cancels the previously - # scheduled workflow run for this branch. However, the default - # branch, and long-term branch (tarantool/release/2.11, - # tarantool/release/2.10, etc) workflow runs are never canceled. - # - # We use a trick here: define the concurrency group as 'workflow - # run ID' + # 'workflow run attempt' because it is a unique - # combination for any run. So it effectively discards grouping. - # - # XXX: we cannot use `github.sha` as a unique identifier because - # pushing a tag may cancel a run that works on a branch push - # event. - group: ${{ startsWith(github.ref, 'refs/heads/tarantool/') - && format('{0}-{1}', github.run_id, github.run_attempt) - || format('{0}-{1}', github.workflow, github.ref) }} - cancel-in-progress: true - -jobs: - coverage: - strategy: - fail-fast: false - runs-on: [self-hosted, regular, x86_64, Linux] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - name: setup Linux - uses: ./.github/actions/setup-linux - - name: install gcovr - uses: ./.github/actions/setup-gcovr - - name: configure - run: > - cmake -S . -B ${{ env.BUILDDIR }} - -G Ninja - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DLUAJIT_ENABLE_COVERAGE=ON - -DLUAJIT_ENABLE_GC64=ON - - name: build - run: cmake --build . --parallel - working-directory: ${{ env.BUILDDIR }} - - name: run regression tests - run: cmake --build ${{ env.BUILDDIR }} --parallel --target LuaJIT-test - - name: generate code coverage report - run: cmake --build ${{ env.BUILDDIR }} --parallel --target LuaJIT-coverage - - name: send code coverage to coveralls.io - run: | - curl -LO https://coveralls.io/coveralls-linux.tar.gz - tar xvzf coveralls-linux.tar.gz - ./coveralls -f ./coverage/luajit.xml - working-directory: ${{ env.BUILDDIR }} - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/exotic-builds-testing.yml b/.github/workflows/exotic-builds-testing.yml deleted file mode 100644 index 7c57d23815..0000000000 --- a/.github/workflows/exotic-builds-testing.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: "Exotic builds testing" - -on: - push: - branches-ignore: - - '**-notest' - - 'upstream-**' - tags-ignore: - - '**' - -concurrency: - # An update of a developer branch cancels the previously - # scheduled workflow run for this branch. However, the default - # branch, and long-term branch (tarantool/release/2.11, - # tarantool/release/2.10, etc) workflow runs are never canceled. - # - # We use a trick here: define the concurrency group as 'workflow - # run ID' + # 'workflow run attempt' because it is a unique - # combination for any run. So it effectively discards grouping. - # - # XXX: we cannot use `github.sha` as a unique identifier because - # pushing a tag may cancel a run that works on a branch push - # event. - group: ${{ startsWith(github.ref, 'refs/heads/tarantool/') - && format('{0}-{1}', github.run_id, github.run_attempt) - || format('{0}-{1}', github.workflow, github.ref) }} - cancel-in-progress: true - -jobs: - test-exotic: - strategy: - fail-fast: false - matrix: - BUILDTYPE: [Debug, Release] - ARCH: [ARM64, x86_64] - GC64: [ON, OFF] - FLAVOR: [checkhook, dualnum, gdbjit, nojit] - include: - - BUILDTYPE: Debug - CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON - - BUILDTYPE: Release - CMAKEFLAGS: -DCMAKE_BUILD_TYPE=RelWithDebInfo - - FLAVOR: dualnum - FLAVORFLAGS: -DLUAJIT_NUMMODE=2 - - FLAVOR: checkhook - FLAVORFLAGS: -DLUAJIT_ENABLE_CHECKHOOK=ON - - FLAVOR: nojit - FLAVORFLAGS: -DLUAJIT_DISABLE_JIT=ON - - FLAVOR: gdbjit - FLAVORFLAGS: -DLUAJIT_USE_GDBJIT=ON - exclude: - - ARCH: ARM64 - GC64: OFF - # DUALNUM is default for ARM64, no need for additional testing. - - FLAVOR: dualnum - ARCH: ARM64 - runs-on: [self-hosted, regular, Linux, '${{ matrix.ARCH }}'] - name: > - LuaJIT ${{ matrix.FLAVOR }} - (Linux/${{ matrix.ARCH }}) - ${{ matrix.BUILDTYPE }} - GC64:${{ matrix.GC64 }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - name: setup Linux - uses: ./.github/actions/setup-linux - - name: configure - run: > - cmake -S . -B ${{ env.BUILDDIR }} - -G Ninja - ${{ matrix.CMAKEFLAGS }} - ${{ matrix.FLAVORFLAGS }} - -DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }} - - name: build - run: cmake --build . --parallel - working-directory: ${{ env.BUILDDIR }} - - name: test - run: cmake --build . --parallel --target LuaJIT-test - working-directory: ${{ env.BUILDDIR }} diff --git a/.github/workflows/gnumake-builds-testing.yml b/.github/workflows/gnumake-builds-testing.yml deleted file mode 100644 index afb9618365..0000000000 --- a/.github/workflows/gnumake-builds-testing.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: "Build test (GNU Make)" - -on: - push: - branches-ignore: - - '**-notest' - - 'upstream-**' - tags-ignore: - - '**' - -concurrency: - # An update of a developer branch cancels the previously - # scheduled workflow run for this branch. However, the default - # branch, and long-term branch (tarantool/release/2.11, - # tarantool/release/2.10, etc) workflow runs are never canceled. - # - # We use a trick here: define the concurrency group as 'workflow - # run ID' + # 'workflow run attempt' because it is a unique - # combination for any run. So it effectively discards grouping. - # - # XXX: we cannot use `github.sha` as a unique identifier because - # pushing a tag may cancel a run that works on a branch push - # event. - group: ${{ startsWith(github.ref, 'refs/heads/tarantool/') - && format('{0}-{1}', github.run_id, github.run_attempt) - || format('{0}-{1}', github.workflow, github.ref) }} - cancel-in-progress: true - -jobs: - build-gnu-make: - strategy: - fail-fast: false - matrix: - ARCH: [ARM64, x86_64] - BUILDTYPE: [Debug, Release] - GC64: [ON, OFF] - OS: [Linux, macOS] - include: - - BUILDTYPE: Debug - CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON - MAKEBUILDFLAGS: -DLUA_USE_ASSERT -DLUA_USE_APICHECK - # Use `CFLAGS`, because it's the last entry in - # `CCOPTIONS`, so we can sure that these flags are not - # overwritten. - CFLAGS: -g -O0 - - BUILDTYPE: Release - CMAKEFLAGS: -DCMAKE_BUILD_TYPE=RelWithDebInfo - - GC64: ON - MAKEGC64FLAGS: -DLUAJIT_ENABLE_GC64 - exclude: - - ARCH: ARM64 - GC64: OFF - - OS: macOS - GC64: OFF - runs-on: [self-hosted, regular, '${{ matrix.OS }}', '${{ matrix.ARCH }}'] - name: > - LuaJIT - (${{ matrix.OS }}/${{ matrix.ARCH }}) - ${{ matrix.BUILDTYPE }} - GC64:${{ matrix.GC64 }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - name: setup Linux - uses: ./.github/actions/setup-linux - if: ${{ matrix.OS == 'Linux' }} - - name: setup macOS - uses: ./.github/actions/setup-macos - if: ${{ matrix.OS == 'macOS' }} - - name: configure (CMake GNU Make) - run: > - cmake -S . -B ${{ env.BUILDDIR }} - ${{ matrix.CMAKEFLAGS }} - -DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }} - - name: build (CMake GNU Make) - run: cmake --build . --parallel - working-directory: ${{ env.BUILDDIR }} - - name: smoke-test (CMake GNU Make) - run: ./src/luajit -e 'print("CMake with GNU Make generator build succeeded")' - working-directory: ${{ env.BUILDDIR }} - - # XXX: working directory is omitted for the next steps, - # since Makefile.original provides only in-source build. - # hence clean up is not needed for the next steps. - - - name: build (Makefile.original) - run: > - make -f Makefile.original -j - CFLAGS='${{ matrix.CFLAGS }}' - XCFLAGS='${{ matrix.MAKEBUILDFLAGS }} ${{ matrix.MAKEGC64FLAGS }}' - - name: smoke-test (Makefile.original) - run: ./src/luajit -e 'print("Makefile.original build succeeded")' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 758ff33e7a..0000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Static analysis - -on: - push: - branches-ignore: - - '**-notest' - - 'upstream-**' - tags-ignore: - - '**' - -concurrency: - # An update of a developer branch cancels the previously - # scheduled workflow run for this branch. However, the default - # branch, and long-term branch (tarantool/release/2.11, - # tarantool/release/2.10, etc) workflow runs are never canceled. - # - # We use a trick here: define the concurrency group as 'workflow - # run ID' + # 'workflow run attempt' because it is a unique - # combination for any run. So it effectively discards grouping. - # - # XXX: we cannot use `github.sha` as a unique identifier because - # pushing a tag may cancel a run that works on a branch push - # event. - group: ${{ startsWith(github.ref, 'refs/heads/tarantool/') - && format('{0}-{1}', github.run_id, github.run_attempt) - || format('{0}-{1}', github.workflow, github.ref) }} - cancel-in-progress: true - -jobs: - test-luacheck: - runs-on: [self-hosted, lightweight, Linux, x86_64] - name: LuaJIT linters (luacheck, flake8) - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - name: environment - uses: ./.github/actions/setup - - name: setup - run: | - # TODO: Move this step to a separate action. - sudo apt -y update - sudo apt -y install cmake ninja-build lua5.1 luarocks - sudo luarocks install luacheck - sudo pip3 install flake8==6.1.0 - # Set CMAKE_BUILD_PARALLEL_LEVEL environment variable to - # limit the number of parallel jobs for build/test step. - echo CMAKE_BUILD_PARALLEL_LEVEL=$(($(nproc) + 1)) | tee -a $GITHUB_ENV - - name: configure - run: cmake -S . -B ${{ env.BUILDDIR }} -G Ninja - - name: lint - run: cmake --build . --target LuaJIT-lint - working-directory: ${{ env.BUILDDIR }} diff --git a/.github/workflows/sanitizers-testing.yml b/.github/workflows/sanitizers-testing.yml deleted file mode 100644 index 4bccfcefb1..0000000000 --- a/.github/workflows/sanitizers-testing.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Sanitizers testing - -on: - push: - branches-ignore: - - '**-notest' - - 'upstream-**' - tags-ignore: - - '**' - -concurrency: - # An update of a developer branch cancels the previously - # scheduled workflow run for this branch. However, the default - # branch, and long-term branch (tarantool/release/2.11, - # tarantool/release/2.10, etc) workflow runs are never canceled. - # - # We use a trick here: define the concurrency group as 'workflow - # run ID' + # 'workflow run attempt' because it is a unique - # combination for any run. So it effectively discards grouping. - # - # XXX: we cannot use `github.sha` as a unique identifier because - # pushing a tag may cancel a run that works on a branch push - # event. - group: ${{ startsWith(github.ref, 'refs/heads/tarantool/') - && format('{0}-{1}', github.run_id, github.run_attempt) - || format('{0}-{1}', github.workflow, github.ref) }} - cancel-in-progress: true - -jobs: - test-asan: - strategy: - fail-fast: false - matrix: - # XXX: Let's start with only Linux/x86_64 - BUILDTYPE: [Debug, Release] - include: - - BUILDTYPE: Debug - CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON - - BUILDTYPE: Release - CMAKEFLAGS: -DCMAKE_BUILD_TYPE=RelWithDebInfo - runs-on: [self-hosted, regular, Linux, x86_64] - name: > - LuaJIT with ASan (Linux/x86_64) - ${{ matrix.BUILDTYPE }} - GC64:ON SYSMALLOC:ON - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - name: setup Linux for sanitizers - uses: ./.github/actions/setup-sanitizers - - name: configure - # XXX: LuaJIT configuration requires a couple of tweaks: - # LUAJIT_USE_SYSMALLOC=ON: Unfortunately, internal LuaJIT - # memory allocator is not instrumented yet, so to find - # any memory errors it's better to build LuaJIT with - # system provided memory allocator (i.e. run CMake - # configuration phase with -DLUAJIT_USE_SYSMALLOC=ON). - # For more info, see root CMakeLists.txt. - # LUAJIT_ENABLE_GC64=ON: LUAJIT_USE_SYSMALLOC cannot be - # enabled on x64 without GC64, since realloc usually - # doesn't return addresses in the right address range. - # For more info, see root CMakeLists.txt. - run: > - cmake -S . -B ${{ env.BUILDDIR }} - -G Ninja - ${{ matrix.CMAKEFLAGS }} - -DLUAJIT_USE_ASAN=ON - -DLUAJIT_USE_SYSMALLOC=ON - -DLUAJIT_ENABLE_GC64=ON - - name: build - run: cmake --build . --parallel - working-directory: ${{ env.BUILDDIR }} - - name: test - env: - # Enable as much checks as possible. See more info here: - # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags, - # https://github.com/google/sanitizers/wiki/SanitizerCommonFlags. - ASAN_OPTIONS: " \ - detect_invalid_pointer_pairs=1: \ - detect_leaks=1: \ - detect_stack_use_after_return=1: \ - dump_instruction_bytes=1: \ - heap_profile=0: \ - print_suppressions=0: \ - symbolize=1: \ - unmap_shadow_on_exit=1: \ - " - run: cmake --build . --parallel --target LuaJIT-test - working-directory: ${{ env.BUILDDIR }} diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml deleted file mode 100644 index cb4ba57b21..0000000000 --- a/.github/workflows/testing.yml +++ /dev/null @@ -1,119 +0,0 @@ -name: Testing - -on: - push: - branches-ignore: - - '**-notest' - - 'upstream-**' - tags-ignore: - - '**' - -concurrency: - # An update of a developer branch cancels the previously - # scheduled workflow run for this branch. However, the default - # branch, and long-term branch (tarantool/release/2.11, - # tarantool/release/2.10, etc) workflow runs are never canceled. - # - # We use a trick here: define the concurrency group as 'workflow - # run ID' + # 'workflow run attempt' because it is a unique - # combination for any run. So it effectively discards grouping. - # - # XXX: we cannot use `github.sha` as a unique identifier because - # pushing a tag may cancel a run that works on a branch push - # event. - group: ${{ startsWith(github.ref, 'refs/heads/tarantool/') - && format('{0}-{1}', github.run_id, github.run_attempt) - || format('{0}-{1}', github.workflow, github.ref) }} - cancel-in-progress: true - -jobs: - test-luajit: - strategy: - fail-fast: false - matrix: - ARCH: [ARM64, x86_64] - BUILDTYPE: [Debug, Release] - GC64: [ON, OFF] - OS: [Linux, macOS] - CC: [gcc, clang] - include: - - BUILDTYPE: Debug - CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON - - BUILDTYPE: Release - CMAKEFLAGS: -DCMAKE_BUILD_TYPE=RelWithDebInfo - exclude: - - ARCH: ARM64 - GC64: OFF - - OS: macOS - GC64: OFF - - OS: macOS - CC: gcc - - ARCH: ARM64 - OS: Linux - CC: clang - runs-on: [self-hosted, regular, '${{ matrix.OS }}', '${{ matrix.ARCH }}'] - name: > - LuaJIT - (${{ matrix.OS }}/${{ matrix.ARCH }}) - ${{ matrix.BUILDTYPE }} - GC64:${{ matrix.GC64 }} - CC:${{ matrix.CC }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - name: setup Linux - uses: ./.github/actions/setup-linux - if: ${{ matrix.OS == 'Linux' }} - - name: setup macOS - uses: ./.github/actions/setup-macos - if: ${{ matrix.OS == 'macOS' }} - - name: configure - run: > - CC=${{ matrix.CC }} - cmake -S . -B ${{ env.BUILDDIR }} - -G Ninja - ${{ matrix.CMAKEFLAGS }} - -DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }} - - name: build - run: cmake --build . --parallel - working-directory: ${{ env.BUILDDIR }} - - name: test - run: cmake --build . --parallel --target LuaJIT-test - working-directory: ${{ env.BUILDDIR }} - - - test-tarantool: - strategy: - fail-fast: false - matrix: - ARCH: [ARM64, x86_64] - BUILDTYPE: [Debug, Release] - GC64: [ON, OFF] - OS: [Linux, macOS] - include: - - BUILDTYPE: Debug - CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug - - BUILDTYPE: Release - CMAKEFLAGS: -DCMAKE_BUILD_TYPE=RelWithDebInfo - exclude: - - ARCH: ARM64 - GC64: OFF - - OS: macOS - GC64: OFF - name: > - Tarantool - (${{ matrix.OS }}/${{ matrix.ARCH }}) - ${{ matrix.BUILDTYPE }} - GC64:${{ matrix.GC64 }} - needs: test-luajit - uses: tarantool/tarantool/.github/workflows/luajit-integration.yml@master - with: - CMAKE_EXTRA_PARAMS: > - -G Ninja - ${{ matrix.CMAKEFLAGS }} - -DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }} - arch: ${{ matrix.ARCH }} - os: ${{ matrix.OS }} - revision: ${{ github.sha }}