Merge branch 'pr_1477'
This commit is contained in:
64
.github/workflows/compile.yml
vendored
64
.github/workflows/compile.yml
vendored
@ -7,43 +7,26 @@ on:
|
|||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ubuntu-x86_64:
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
image: ['ubuntu:20.04', 'centos:7']
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
container: ${{ matrix.image }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install environment
|
- name: Install ubuntu environment
|
||||||
shell: bash
|
|
||||||
run: sudo apt-get install -y git wget rpm rpm2cpio cpio make build-essential binutils m4 libtool-bin language-pack-en
|
|
||||||
|
|
||||||
- name: Cache deps
|
|
||||||
id: cache-deps
|
|
||||||
uses: actions/cache@v3
|
|
||||||
env:
|
|
||||||
cache-name: cache-deps
|
|
||||||
with:
|
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-el7.x86_64-${{ hashFiles('deps/init/oceanbase.el7.x86_64.deps') }}
|
|
||||||
path: deps/3rd
|
|
||||||
enableCrossOsArchive: true
|
|
||||||
|
|
||||||
- name: Build init
|
|
||||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
|
||||||
run: bash build.sh init
|
|
||||||
|
|
||||||
- name: Build project
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ startsWith(matrix.image, 'ubuntu') }}
|
||||||
run: |
|
run: |
|
||||||
bash build.sh debug
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
cd build_debug && make -j4
|
apt-get update
|
||||||
|
apt-get install -y git wget rpm rpm2cpio cpio make build-essential binutils m4 libtool-bin libncurses5
|
||||||
|
|
||||||
centos-x86_64:
|
- name: Install centos environment
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: centos:7
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install environment
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ startsWith(matrix.image, 'centos') }}
|
||||||
run: yum install -y git wget rpm* cpio make glibc-devel glibc-headers binutils m4
|
run: yum install -y git wget rpm* cpio make glibc-devel glibc-headers binutils m4
|
||||||
|
|
||||||
- name: Cache deps
|
- name: Cache deps
|
||||||
@ -56,6 +39,18 @@ jobs:
|
|||||||
path: deps/3rd
|
path: deps/3rd
|
||||||
enableCrossOsArchive: true
|
enableCrossOsArchive: true
|
||||||
|
|
||||||
|
- name: Cache build
|
||||||
|
id: cache-build
|
||||||
|
uses: actions/cache@v3
|
||||||
|
env:
|
||||||
|
cache-name: cache-build
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.image }}-el7.x86_64-${{ github.ref_name }}
|
||||||
|
path: ~/.ccache
|
||||||
|
enableCrossOsArchive: false
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.image }}-el7.x86_64
|
||||||
|
|
||||||
- name: Build init
|
- name: Build init
|
||||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
if: steps.cache-deps.outputs.cache-hit != 'true'
|
||||||
run: bash build.sh init
|
run: bash build.sh init
|
||||||
@ -63,5 +58,12 @@ jobs:
|
|||||||
- name: Build project
|
- name: Build project
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
bash build.sh debug
|
rm -rf build_debug
|
||||||
cd build_debug && make -j4
|
export CCACHE_LOGFILE=$PWD/ccache.log
|
||||||
|
deps/3rd/usr/local/oceanbase/devtools/bin/ccache -z
|
||||||
|
bash build.sh debug -DOB_USE_CCACHE=ON
|
||||||
|
cd build_debug && make -j4 && cd -
|
||||||
|
deps/3rd/usr/local/oceanbase/devtools/bin/ccache -s
|
||||||
|
|
||||||
|
- if: ${{ runner.debug }}
|
||||||
|
run: cat $PWD/ccache.log
|
||||||
|
|||||||
Reference in New Issue
Block a user