68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
name: Compile
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
ubuntu-x86_64:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install 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
|
|
run: |
|
|
bash build.sh debug
|
|
cd build_debug && make -j4
|
|
|
|
centos-x86_64:
|
|
runs-on: ubuntu-20.04
|
|
container: centos:7
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install environment
|
|
shell: bash
|
|
run: yum install -y git wget rpm* cpio make glibc-devel glibc-headers binutils m4
|
|
|
|
- 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
|
|
run: |
|
|
bash build.sh debug
|
|
cd build_debug && make -j4
|