Skip to content

Commit

Permalink
Delete cmake building
Browse files Browse the repository at this point in the history
  • Loading branch information
JalonWong committed Jan 23, 2024
1 parent 14a830f commit 692913f
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 412 deletions.
147 changes: 74 additions & 73 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,83 +7,83 @@ on:
branches:
- main
jobs:
distcheck:
strategy:
matrix:
os: [macos-latest, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev
- name: Install Mac dependencies
if: startsWith(matrix.os, 'macos')
run: brew install protobuf automake
- name: Run distcheck
run: |
./autogen.sh
./configure
make -j${nproc} distcheck VERBOSE=1
# distcheck:
# strategy:
# matrix:
# os: [macos-latest, ubuntu-20.04]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - name: Install Linux dependencies
# if: startsWith(matrix.os, 'ubuntu')
# run: sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev
# - name: Install Mac dependencies
# if: startsWith(matrix.os, 'macos')
# run: brew install protobuf automake
# - name: Run distcheck
# run: |
# ./autogen.sh
# ./configure
# make -j${nproc} distcheck VERBOSE=1

distcheck-multiarch:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- arch: armv7
- arch: aarch64
- arch: s390x
- arch: ppc64le
steps:
- uses: actions/checkout@v2
- uses: uraimo/run-on-arch-action@v2.0.9
name: Install dependencies and run distcheck
id: runcmd
with:
arch: ${{ matrix.arch }}
githubToken: ${{ github.token }}
distro: ubuntu20.04
install: |
apt-get update -q -y
apt-get install -q -y build-essential autoconf automake libtool pkg-config
apt-get install -q -y protobuf-compiler libprotobuf-dev libprotoc-dev
# distcheck-multiarch:
# runs-on: ubuntu-20.04
# strategy:
# matrix:
# include:
# - arch: armv7
# - arch: aarch64
# - arch: s390x
# - arch: ppc64le
# steps:
# - uses: actions/checkout@v2
# - uses: uraimo/run-on-arch-action@v2.0.9
# name: Install dependencies and run distcheck
# id: runcmd
# with:
# arch: ${{ matrix.arch }}
# githubToken: ${{ github.token }}
# distro: ubuntu20.04
# install: |
# apt-get update -q -y
# apt-get install -q -y build-essential autoconf automake libtool pkg-config
# apt-get install -q -y protobuf-compiler libprotobuf-dev libprotoc-dev

run: |
./autogen.sh
./configure
make -j3 distcheck VERBOSE=1
# run: |
# ./autogen.sh
# ./configure
# make -j3 distcheck VERBOSE=1

valgrind:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev valgrind
- name: Run distcheck with valgrind
run: |
./autogen.sh
./configure --enable-valgrind-tests CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined"
make -j${nproc} distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-valgrind-tests CFLAGS=\"-fsanitize=undefined -fno-sanitize-recover=undefined\"" VERBOSE=1
# valgrind:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev valgrind
# - name: Run distcheck with valgrind
# run: |
# ./autogen.sh
# ./configure --enable-valgrind-tests CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined"
# make -j${nproc} distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-valgrind-tests CFLAGS=\"-fsanitize=undefined -fno-sanitize-recover=undefined\"" VERBOSE=1

coverage:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev lcov
- name: Run coverage build
run: |
./autogen.sh
./configure --enable-code-coverage
make -j${nproc}
mkdir coverage
lcov --no-external --capture --initial --directory . --output-file ./coverage/lcov.info --include '*protobuf-c.c'
make check
lcov --no-external --capture --directory . --output-file ./coverage/lcov.info --include '*protobuf-c.c'
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# coverage:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev lcov
# - name: Run coverage build
# run: |
# ./autogen.sh
# ./configure --enable-code-coverage
# make -j${nproc}
# mkdir coverage
# lcov --no-external --capture --initial --directory . --output-file ./coverage/lcov.info --include '*protobuf-c.c'
# make check
# lcov --no-external --capture --directory . --output-file ./coverage/lcov.info --include '*protobuf-c.c'
# - uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}

bazel:
strategy:
Expand All @@ -100,5 +100,6 @@ jobs:
msbuild-architecture: x64
- name: Run tests
run: |
python --version
bazel --version
bazel test tests
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ t/version/version
*.pb.cc
*.pb.h
/bazel-*
/.vscode
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test_suite(
tests = [
"//t:test-generated-code",
"//t:test-generated-code2",
"//t:test-generated-code3",
# "//t:test-generated-code_v3",
"//t:version",
"//t/issue204",
"//t/issue220",
Expand Down
2 changes: 1 addition & 1 deletion build-bazel/stdout_2_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
parser.add_argument("-i")
parser.add_argument("-o")
args = parser.parse_args()
with open(args.o, "w") as f:
with open(args.o, "w", encoding="utf-8") as f:
subprocess.run([args.i], stdout=f)
4 changes: 0 additions & 4 deletions build-cmake/.gitignore

This file was deleted.

Loading

0 comments on commit 692913f

Please sign in to comment.