Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nyndyny authored Oct 2, 2022
1 parent e7e25c5 commit 3e8de3b
Showing 1 changed file with 1 addition and 114 deletions.
115 changes: 1 addition & 114 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,124 +1,11 @@
name: Build

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
paths-ignore:
# TODO: how to avoid duplicating this list?
- README.md
- 'docs/**'
- 'architecture/**'
- 'managed/**'
- '.gitignore'
- '.github/vale-styles/**'

pull_request:
branches:
- master
paths-ignore:
# TODO: how to avoid duplicating this list?
- README.md
- 'docs/**'
- 'architecture/**'
- 'managed/**'
- '.gitignore'
- '.github/vale-styles/**'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
types: [opened, synchronize, reopened]
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-20.04
name: ${{ matrix.name }}

# Grab the latest CentOS 7 image from here:
# https://hub.docker.com/r/yugabyteci/yb_build_infra_centos7/tags?page=1&ordering=last_updated

strategy:
fail-fast: false
matrix:
include:
- name: "Clang 13, debug, CentOS 7"
os: ubuntu-20.04
yb_build_args: --clang13 debug --no-linuxbrew

- name: "Clang 13, fastdebug, CentOS 7"
os: ubuntu-20.04
yb_build_args: --clang13 fastdebug --no-linuxbrew

- name: "Clang 13, release, CentOS 7"
os: ubuntu-20.04
yb_build_args: --clang13 release --no-linuxbrew

- name: "Clang 13, release, CentOS 7, Linuxbrew glibc"
os: ubuntu-20.04
yb_build_args: --clang13 release --linuxbrew

- name: "GCC 11, debug, CentOS 7"
os: ubuntu-20.04
yb_build_args: --gcc11 debug --no-linuxbrew

- name: "GCC 11, fastdebug, CentOS 7"
os: ubuntu-20.04
yb_build_args: --gcc11 fastdebug --no-linuxbrew

- name: "GCC 11, release, CentOS 7"
os: ubuntu-20.04
yb_build_args: --gcc11 release --no-linuxbrew
if: >
(github.event_name == 'push' &&
!contains(github.event.head_commit.message, 'skip ci') &&
!contains(github.event.head_commit.message, 'ci skip')) ||
github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v2

- name: Build YugabyteDB
run: |
echo "OSTYPE (outside Docker): $OSTYPE"
echo "Build name: ${{ matrix.name }}"
echo "Docker image: ${{ matrix.docker_image }}"
if [[ $OSTYPE == linux* ]]; then
build_dir_in_container=/opt/yb-build/yugabyte-db
docker run \
-i \
"-w=$build_dir_in_container" \
--mount type=bind,source="$PWD",target="$build_dir_in_container" \
"yugabyteci/yb_build_infra_centos7:v2022-05-05T04_49_22" \
bash -c '
set -euo pipefail -x
echo "OSTYPE (inside Docker): $OSTYPE"
echo "PATH: $PATH"
export PATH=/usr/local/bin:$PATH
( set -x; ls -l /usr/local/bin )
set +e
( set -x; which ninja )
( set -x; which cmake )
set -e
chown -R yugabyteci .
sudo -u yugabyteci bash -c "
set -euo pipefail
export PATH=/usr/local/bin:\$PATH
df -H /
echo ::group::Building YugabyteDB
./yb_build.sh release \
--download-thirdparty \
--ninja \
--shellcheck \
${{ matrix.yb_build_args }}
echo ::endgroup::
df -H /
"
'
elif [[ $OSTYPE == darwin* ]]; then
system_profiler SPSoftwareDataType
sw_vers
./yb_build.sh release --shellcheck
fi
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
Expand Down

0 comments on commit 3e8de3b

Please sign in to comment.