Skip to content
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

GitHub build ci #577

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

findNextStep
Copy link

add github ci integrated

include

  • build in macos/linux-ubuntu
  • clang-format check for all code under src floder

I format some code for clang-format ci check

@findNextStep
Copy link
Author

for issue #534

@XVilka
Copy link

XVilka commented Feb 22, 2020

Would be nice to run the tests too.

@findNextStep
Copy link
Author

Would be nice to run the tests too.

test-index in ccls seem to need clang-6 but I can`t work out with mac, can you help with that?

@XVilka
Copy link

XVilka commented Feb 25, 2020

Will check later, yes

Copy link
Contributor

@xerrni xerrni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also correct commit message from "add github ci integrated" to something more verbose like:

Add github CI integration.

CI will be responsible for compiling source code and code formatting.

- name: clone submodule
run: git submodule update --init --recursive
- name: cmake generate
run: cmake -H. -Bbuild/Debug
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake -H. -Bbuild/Debug -DCMAKE_BUILD_TYPE=Debug

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

- name: cmake generate
run: cmake -H. -Bbuild/Debug
- name: make
run: make -C build/Debug -j
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake --build ./build/Debug

steps:
- uses: actions/checkout@v2
- name: install depend
run: sudo apt install clang libclang-9-dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEBIAN_FRONTEND="noninteractive" sudo apt -y install clang libclang-9-dev

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please correct this line.

- name: clone submodule
run: git submodule update --init --recursive
- name: cmake generate
run: cmake -H. -Bbuild/Debug -DClang_DIR=/usr/local/opt/llvm/lib/cmake/clang -DLLVM_DIR=/usr/local/opt/llvm/lib/cmake
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake -H. -Bbuild/Debug -DClang_DIR=/usr/local/opt/llvm/lib/cmake/clang -DLLVM_DIR=/usr/local/opt/llvm -DCMAKE_BUILD_TYPE=Debug

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also you may wrap this line so it wont be exceed 120 characters.

- name: cmake generate
run: cmake -H. -Bbuild/Debug -DClang_DIR=/usr/local/opt/llvm/lib/cmake/clang -DLLVM_DIR=/usr/local/opt/llvm/lib/cmake
- name: make
run: make -C build/Debug -j
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake --build ./build/Debug

@findNextStep findNextStep force-pushed the github_build_ci branch 3 times, most recently from 46eb5a3 to 11c9884 Compare July 4, 2020 08:54
CI will be responsible for compiling source code and code formatting.
@findNextStep findNextStep force-pushed the github_build_ci branch 2 times, most recently from 5d35dbe to a4e7b93 Compare July 4, 2020 08:59
@findNextStep
Copy link
Author

Please also correct commit message from "add github ci integrated" to something more verbose like:

Add github CI integration.

CI will be responsible for compiling source code and code formatting.

all suggest has accepted

@MaskRay MaskRay force-pushed the master branch 2 times, most recently from 7818055 to 99f0b40 Compare July 5, 2020 22:12
@Trass3r
Copy link

Trass3r commented Jul 11, 2020

Imo you should do Release builds instead to be able to publish them.

@xerrni
Copy link
Contributor

xerrni commented Jul 13, 2020

@Trass3r @findNextStep
CI should create both as it is a good practice especially for c/c++ projects where depending on build type different macros / defines etc. will be used.

@MaskRay MaskRay force-pushed the master branch 4 times, most recently from a33231a to cb08df4 Compare July 20, 2020 00:03
@MaskRay MaskRay force-pushed the master branch 3 times, most recently from ee29996 to feb153a Compare December 20, 2020 03:01
@MaskRay MaskRay force-pushed the master branch 9 times, most recently from 94ba2b3 to c018bce Compare May 9, 2021 18:34
@Endle
Copy link

Endle commented Mar 22, 2024

How about adding a basic Github CI at the beginning, and try to add further CI workflows in further PRs?

IHMO a working CI could not only run unit tests, but also be an example of how to build and install this project, as a supplement of the docs.

I'd like to take over this PR if it has been stalled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants