From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id CAE836E454; Tue, 1 Mar 2022 16:19:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CAE836E454 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1646140742; bh=g6QkwPm5BZ96fcYSh2NJb3KaKgOlkf1mtanH07NWxCE=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=uuxrcPLRN6gtE8fGhLfo0Xlk7fuWZX82ZADEX3H4lTGoFLL0ZlBa26sczYvtCfF9L GVIdMRGxrSIeVjeTtByq3Sd/bnh0b0YH4CscX+62qRgcy6DboLJQgrDBWfUhYqcBPM ZoKyUhVBGPnz33eflYi4YwTk0gE+JbgpPttoJ17s= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 97F606E454 for ; Tue, 1 Mar 2022 16:19:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 97F606E454 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1nP2P5-00023S-JC; Tue, 01 Mar 2022 16:19:00 +0300 To: Sergey Kaplun , Maxim Kokryashkin Date: Tue, 1 Mar 2022 16:15:41 +0300 Message-Id: X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9A10ECB78D781867AFB4B3881DA9D2AF00F4AB0E68D9B29C1182A05F538085040CD2AD74CECB38D8933040F914A9DF0744321C6A468CED74AAB946061B395587E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70C5E0F71D77D667BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637680B37D8C6EC627A8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8222FE4C3018984D8732B9884777103A5117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735209ECD01F8117BC8BEA471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CB1724D34C644744043847C11F186F3C59DAA53EE0834AAEE X-8FC586DF: 6EFBBC1D9D64D975 X-B7AD71C0: 1B70FBA5C9BEEE72C9761FC34675ADEB871C96603B655635EE9D5CB6078CC77C75D7A17BE1920E02135824B3FEAB4495 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C8BCA4ED8E84C9E68FB0018F72D410862B92FBBCFE1E0B4259C2B6934AE262D3EE7EAB7254005DCEDCA49AE984FFD707D1E0A4E2319210D9B64D260DF9561598F01A9E91200F654B038889A5EF59567618E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343C45ADCD169245FA2BDA117F5AEAAA9CC45ECF7DDD75CD3B6FE8F664D5847A29E887479D355EACB21D7E09C32AA3244C8D7606EB39924EFBF1D2305C658592BB95A9E0DC41E9A4CF927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXh9f6MwXK7iy0XazoHtX5s2 X-Mailru-Sender: 689FA8AB762F739339CABD9B3CA9A7D6877521C87E8D30DB287A7F35D859816AA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit] ci: introduce GitHub Actions X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This patch introduces the following testing matrix for our LuaJIT fork: +--------------------------------+------------------+-------------+ | | Linux | macOS | | +--------+---------+--------+----+ | | x86_64 | aarch64 | x86_64 | M1 | +---------------+----------------+--------+---------+--------+----+ | | RelWithDebInfo | + | + | + | + | + GC64 disabled +----------------+--------+---------+--------+----+ | | Debug(*) | + | + | + | + | +---------------+----------------+--------+---------+--------+----+ | | RelWithDebInfo | + | + | + | + | + GC64 enabled +----------------+--------+---------+--------+----+ | | Debug(*) | + | + | + | + | +---------------+----------------+--------+---------+--------+----+ (*) Debug build also uses LuaJIT internal assertions. For each column there is a separate workflow file, since it requires a specific runner and setup routine. For each row workflow toggles GC64 mode and build type flags and triggers the run with the chosen configuration options. There is one more workflow running only static analysis check. This division is caused by specific requirements to be installed (i.e. luarocks and luacheck). For other workflows rule is just a noop step (see test/CMakeLists.txt for more info). All workflows are not triggered for the branches with "-notest" suffix and also "upstream-" prefix (but they are unlikely to be merged into the latter ones anyway). Nothing is also triggered for all tags. There is also one nit to be mentioned: actively running workflows on all branches except the long-term ones (i.e. tarantool, tarantool-1.10, etc) are canceled if "force push" occurs. Signed-off-by: Igor Munkin --- .github/workflows/lint.yml | 47 ++++++++++++++++++++ .github/workflows/linux-aarch64.yml | 57 +++++++++++++++++++++++++ .github/workflows/linux-x86_64.yml | 57 +++++++++++++++++++++++++ .github/workflows/macos-m1.yml | 66 +++++++++++++++++++++++++++++ .github/workflows/macos-x86_64.yml | 66 +++++++++++++++++++++++++++++ 5 files changed, 293 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/linux-aarch64.yml create mode 100644 .github/workflows/linux-x86_64.yml create mode 100644 .github/workflows/macos-m1.yml create mode 100644 .github/workflows/macos-x86_64.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..e0cb8eff --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,47 @@ +name: "Static analysis" + +on: + push: + branches-ignore: + - '**-notest' + - 'upstream-**' + tags-ignore: + - '**' + +concurrency: + # Update of a developer branch cancels the previously scheduled + # workflow run for this branch. However, the default branch, + # and long-term branch (tarantool-1.10, tarantool-2.8, 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: ${{ ( + github.ref == 'refs/heads/tarantool' || + 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: ubuntu-20.04-self-hosted + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + submodules: recursive + - name: setup + run: | + sudo apt -y update + sudo apt -y install cmake make lua5.1 luarocks + sudo luarocks install luacheck + - name: configure + run: cmake . + - name: test + run: make -j LuaJIT-luacheck diff --git a/.github/workflows/linux-aarch64.yml b/.github/workflows/linux-aarch64.yml new file mode 100644 index 00000000..a43d22ac --- /dev/null +++ b/.github/workflows/linux-aarch64.yml @@ -0,0 +1,57 @@ +name: "LuaJIT test workflow (Linux/AArch64)" + +on: + push: + branches-ignore: + - '**-notest' + - 'upstream-**' + tags-ignore: + - '**' + +concurrency: + # Update of a developer branch cancels the previously scheduled + # workflow run for this branch. However, the default branch, + # and long-term branch (tarantool-1.10, tarantool-2.8, 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: ${{ ( + github.ref == 'refs/heads/tarantool' || + 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-linux-aarch64: + runs-on: graviton + strategy: + matrix: + BUILDTYPE: + - -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON + - -DCMAKE_BUILD_TYPE=RelWithDebInfo + GC64: + - -DLUAJIT_ENABLE_GC64=ON + - -DLUAJIT_ENABLE_GC64=OFF + + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + submodules: recursive + - name: setup + run: | + sudo apt -y update + sudo apt -y install cmake gcc make perl + - name: configure + run: cmake . ${{ matrix.BUILDTYPE }} ${{ matrix.GC64 }} + - name: build + run: make -j + - name: test + run: make -j test diff --git a/.github/workflows/linux-x86_64.yml b/.github/workflows/linux-x86_64.yml new file mode 100644 index 00000000..0f32e56d --- /dev/null +++ b/.github/workflows/linux-x86_64.yml @@ -0,0 +1,57 @@ +name: "LuaJIT test workflow (Linux/x86_64)" + +on: + push: + branches-ignore: + - '**-notest' + - 'upstream-**' + tags-ignore: + - '**' + +concurrency: + # Update of a developer branch cancels the previously scheduled + # workflow run for this branch. However, the default branch, + # and long-term branch (tarantool-1.10, tarantool-2.8, 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: ${{ ( + github.ref == 'refs/heads/tarantool' || + 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-linux-x86_64: + runs-on: ubuntu-20.04-self-hosted + strategy: + matrix: + BUILDTYPE: + - -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON + - -DCMAKE_BUILD_TYPE=RelWithDebInfo + GC64: + - -DLUAJIT_ENABLE_GC64=ON + - -DLUAJIT_ENABLE_GC64=OFF + + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + submodules: recursive + - name: setup + run: | + sudo apt -y update + sudo apt -y install cmake gcc make perl + - name: configure + run: cmake . ${{ matrix.BUILDTYPE }} ${{ matrix.GC64 }} + - name: build + run: make -j + - name: test + run: make -j test diff --git a/.github/workflows/macos-m1.yml b/.github/workflows/macos-m1.yml new file mode 100644 index 00000000..c34953be --- /dev/null +++ b/.github/workflows/macos-m1.yml @@ -0,0 +1,66 @@ +name: "LuaJIT test workflow (macOS/M1)" + +on: + push: + branches-ignore: + - '**-notest' + - 'upstream-**' + tags-ignore: + - '**' + +concurrency: + # Update of a developer branch cancels the previously scheduled + # workflow run for this branch. However, the default branch, + # and long-term branch (tarantool-1.10, tarantool-2.8, 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: ${{ ( + github.ref == 'refs/heads/tarantool' || + 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-macos-m1: + runs-on: macos-11-m1 + strategy: + matrix: + BUILDTYPE: + - -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON + - -DCMAKE_BUILD_TYPE=RelWithDebInfo + GC64: + - -DLUAJIT_ENABLE_GC64=ON + - -DLUAJIT_ENABLE_GC64=OFF + + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + submodules: recursive + - name: setup + run: | + # Install brew using command from Homebrew repository instructions: + # https://github.com/Homebrew/install + # XXX: 'echo' command below is required since brew installation + # script obliges the one to enter a newline for confirming the + # installation via Ruby script. + brew update || + echo | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + # try to install the packages either upgrade it to avoid of fails + # if the package already exists with the previous version + brew install --force cmake gcc make perl || + brew upgrade cmake gcc make perl + - name: configure + run: cmake . ${{ matrix.BUILDTYPE }} ${{ matrix.GC64 }} + - name: build + run: make -j + - name: test + run: make -j test diff --git a/.github/workflows/macos-x86_64.yml b/.github/workflows/macos-x86_64.yml new file mode 100644 index 00000000..cbf8a285 --- /dev/null +++ b/.github/workflows/macos-x86_64.yml @@ -0,0 +1,66 @@ +name: "LuaJIT test workflow (macOS/x86_64)" + +on: + push: + branches-ignore: + - '**-notest' + - 'upstream-**' + tags-ignore: + - '**' + +concurrency: + # Update of a developer branch cancels the previously scheduled + # workflow run for this branch. However, the default branch, + # and long-term branch (tarantool-1.10, tarantool-2.8, 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: ${{ ( + github.ref == 'refs/heads/tarantool' || + 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-macos-x86_64: + runs-on: macos-11 + strategy: + matrix: + BUILDTYPE: + - -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON + - -DCMAKE_BUILD_TYPE=RelWithDebInfo + GC64: + - -DLUAJIT_ENABLE_GC64=ON + - -DLUAJIT_ENABLE_GC64=OFF + + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + submodules: recursive + - name: setup + run: | + # Install brew using command from Homebrew repository instructions: + # https://github.com/Homebrew/install + # XXX: 'echo' command below is required since brew installation + # script obliges the one to enter a newline for confirming the + # installation via Ruby script. + brew update || + echo | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + # try to install the packages either upgrade it to avoid of fails + # if the package already exists with the previous version + brew install --force cmake gcc make perl || + brew upgrade cmake gcc make perl + - name: configure + run: cmake . ${{ matrix.BUILDTYPE }} ${{ matrix.GC64 }} + - name: build + run: make -j + - name: test + run: make -j test -- 2.34.0