Skip to content

ci: add a debug Tarantool build #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 59 additions & 4 deletions .github/workflows/fast_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- '2.7'
- '2.8'
- '2.10'
- 'debug-master'
cartridge-version:
- '2.7.4'
metrics-version:
- ''
- '0.10.0'
Expand All @@ -33,25 +36,77 @@ jobs:
coveralls: [false]
include:
- tarantool: '2.10'
cartridge-version: '2.7.4'
metrics-version: '0.13.0'
coveralls: true

env:
TNT_DEBUG_PATH: /home/runner/tnt-debug

runs-on: ubuntu-latest
steps:
- name: Install tarantool ${{ matrix.tarantool }}
if: startsWith(matrix.tarantool, 'debug') != true
uses: tarantool/setup-tarantool@v1
with:
tarantool-version: ${{ matrix.tarantool }}

- name: Create variables for Tarantool ${{ matrix.tarantool }}
if: startsWith(matrix.tarantool, 'debug')
run: |
branch=$(echo ${{ matrix.tarantool }} | cut -d- -f2)
commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch ${branch} | head -c 8)
echo "TNT_BRANCH=${branch}" >> $GITHUB_ENV
echo "VERSION_POSTFIX=-${commit_hash}" >> $GITHUB_ENV
shell: bash

- name: Cache tarantool build
if: startsWith(matrix.tarantool, 'debug')
id: cache-tnt-debug
uses: actions/cache@v3
with:
path: ${{ env.TNT_DEBUG_PATH }}
key: cache-tnt-${{ matrix.tarantool }}${{ env.VERSION_POSTFIX }}

- name: Clone tarantool ${{ matrix.tarantool }}
if: startsWith(matrix.tarantool, 'debug') && steps.cache-tnt-debug.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: tarantool/tarantool
ref: ${{ env.TNT_BRANCH }}
path: tarantool
fetch-depth: 0
submodules: true

- name: Build tarantool ${{ matrix.tarantool }}
if: startsWith(matrix.tarantool, 'debug') && steps.cache-tnt-debug.outputs.cache-hit != 'true'
run: |
sudo apt-get -y install git build-essential cmake make zlib1g-dev \
libreadline-dev libncurses5-dev libssl-dev \
libunwind-dev libicu-dev python3 python3-yaml \
python3-six python3-gevent
cd ${GITHUB_WORKSPACE}/tarantool
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_DIST=ON
make
make DESTDIR=${TNT_DEBUG_PATH} install

- name: Install tarantool ${{ matrix.tarantool }}
if: startsWith(matrix.tarantool, 'debug')
run: |
sudo cp -rvP ${TNT_DEBUG_PATH}/usr/local/* /usr/local/

- name: Clone the module
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cache rocks
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-rocks
with:
path: .rocks/
key: cache-rocks-${{ matrix.tarantool }}-07
key: "cache-rocks-${{ matrix.tarantool }}${{ env.VERSION_POSTFIX }}-\
${{ matrix.cartridge-version }}-\
${{ matrix.metrics-version }}"

- name: Install requirements
run: make deps
Expand All @@ -60,7 +115,7 @@ jobs:
- name: Install cartridge and metrics
if: matrix.metrics-version != ''
run: |
tarantoolctl rocks install cartridge 2.7.4
tarantoolctl rocks install cartridge ${{ matrix.cartridge-version }}
tarantoolctl rocks install metrics ${{ matrix.metrics-version }}

- run: echo $PWD/.rocks/bin >> $GITHUB_PATH
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
Expand All @@ -20,7 +20,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

# Create a rockspec for the release.
- run: printf '%s=%s\n' TAG "${GITHUB_REF##*/}" >> "${GITHUB_ENV}"
Expand Down Expand Up @@ -69,10 +69,10 @@ jobs:
tarantool-version: 2.8

- name: Clone the module
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cache rocks
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-rocks
with:
path: .rocks/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Clone the expirationd module
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/expirationd

- name: Download the Tarantool build artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact_name }}

Expand Down