8000 Convert travis-ci/appveyor to github actions by ygj6 · Pull Request #951 · libevent/libevent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Convert travis-ci/appveyor to github actions #951

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

Merged
merged 8 commits into from
Jan 26, 2020
Merged

Conversation

ygj6
Copy link
Member
@ygj6 ygj6 commented Jan 21, 2020

Closes: #945

  • cmake/CodeCoverage.cmake

CMAKE_C_COMPILER_ID is AppleClang on mac. The command make verify_coverage will fail unless you change line 78 in cmake/CodeCoverage.cmake.

Checking CMAKE_BUILD_TYPE on lines 83-85 is redundant because it is already done on lines 186-188 in CMakeLists.txt, and it cause a warning when CMAKE_BUILD_TYPE is set to 'debug'.

The command lcov --remove always treats the output as an absolute path, so we need pass it a full path.

  • test-export/test-export.py

Supports all versions of Visual Studio.

  • cmake/AddEventLibrary.cmake

Before setting rpath:

$ ldd /usr/local/lib/libevent_extra-2.2.so.1.0.0
linux-vdso.so.1 =>  (0x00007ffc359fd000)
libachk.so => /lib/libachk.so (0x00007fbf96c91000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbf96a74000)
libevent_core-2.2.so.1 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbf966aa000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbf964a6000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbf9629e000)
/lib64/ld-linux-x86-64.so.2 (0x00005593976fb000)

After setting rpath:

$ ldd /usr/local/lib/libevent_extra-2.2.so.1.0.0
linux-vdso.so.1 =>  (0x00007fffd03b7000)
libachk.so => /lib/libachk.so (0x00007ff9a363d000)
libevent_core-2.2.so.1 => /usr/local/lib/libevent_core-2.2.so.1 (0x00007ff9a3406000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff9a31e9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff9a2e1f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff9a2c1b000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff9a2a13000)
/lib64/ld-linux-x86-64.so.2 (0x0000556261411000)
  • doxygen

We need do some settings for libevent/libevent and libevent/doc:
First, generate the keys:
ssh-keygen -f libevent-deploy-key # will generate libevent-deploy-key and libevent-deploy-key.pub

Open https://github.com/libevent/libevent/settings/secrets -> Add new secrets
Name input LIBEVENT_DEPLOY_PRI
Value input content of libevent-deploy-key

Open https://github.com/libevent/doc/settings/keys -> Add deploy key
Title input LIBEVENT_DEPLOY_PUB
Key input content of libevent-deploy-key.pub

@azat
Copy link
Member
azat commented Jan 21, 2020

I'm seeing that common_timeout fails, should be marked with TT_RETRIABLE

@azat
Copy link
Member
azat commented Jan 21, 2020

@ygj6 great job! how long does it takes now on github actions?

@ygj6
Copy link
Member Author
ygj6 commented Jan 21, 2020

About 15min in my morning (maybe your evening), but it is very slow and easy to fail in the evening. Just my personal feeling.


- name: Deploy Documentation
env:
LIBEVENT_DEPLOY_PRI: ${{ secrets.LIBEVENT_DEPLOY_PRI }}
Copy link
Member

Choose a reason for hiding this comment

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

A was talking about this variable, is it available for PRs? (I couldn't find anything in documentation)

Copy link
Member Author

Choose a reason for hiding this comment

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

#951 (comment)
‘secrets.LIBEVENT_DEPLOY_PRI’ is defined by myself.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, the libevent repo will need the same, and my question is will these secrete variable will be available to the PRs?

For example, in travis-ci encrypted variables a not available to the PRs:

Encrypted environment variables are not available to pull requests from forks due to the security risk of exposing such information to unknown code.

Copy link
Member Author

Choose a reason for hiding this comment

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

doxygen workflow is not applicable for PRs. And the workflow runs only on push events, not pull_request events.

on:
  push:
    branches:
      - master

The workflow will be triggered if PR is merged.

I also test this in a example.

Copy link
Member

Choose a reason for hiding this comment

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

doxygen workflow is not applicable for PRs.

Ok, just out of curiosity do you know if user-defined secrets available for the PRs?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure. I will keep track of this issue, maybe I am missing something now.

@ygj6
Copy link
Member Author
ygj6 commented Jan 22, 2020

I made some modifications:

  • cache on windows

actions/cache@v1.0.3 has some bugs on windows-2019, and actions/cache@v1.1.0 has some bugs on windows-2016. So I divided Windows-2016 and Windows-2019 into two jobs.

  • parallel test

Parallel testing is still likely to fail, so I deleted several CTEST_PARALLEL_LEVEL.

@azat
Copy link
Member
azat commented Jan 22, 2020

@ygj6 any other known issues? or ready for merge?

@ygj6 ygj6 force-pushed the TODO branch 2 times, most recently from f3c1ac4 to 6611f45 Compare January 23, 2020 07:14
@ygj6
Copy link
Member Author
ygj6 commented Jan 23, 2020

I'm seeing that common_timeout fails, should be marked with TT_RETRIABLE

I added some codes like make test || make test to ensure that jobs can be retried if it fails.

@ygj6 ygj6 force-pushed the TODO branch 2 times, most recently from d9af6a3 to 8aa973f Compare January 23, 2020 07:47
@ygj6
Copy link
Member Author
ygj6 commented Jan 23, 2020

In the last force-push, I deleted the branch TODO in the workflow, which exists only in my repository.
I think this PR can be merged.

@azat
Copy link
Member
azat commented Jan 23, 2020

Ok, are you ok with my push (maybe --force) into your TODO branch?

@azat
Copy link
Member
azat commented Jan 23, 2020

make test || make test

But this will retry all tests, while we need only few

azat added a commit to azat/libevent that referenced this pull request Jan 23, 2020
@azat
Copy link
Member
azat commented Jan 23, 2020

My topic branch against your PR is github-actions

@ygj6
Copy link
Member Author
ygj6 commented Jan 24, 2020

are you ok with my push (maybe --force) into your TODO branch?

OK, no problem.

azat added a commit to azat/libevent that referenced this pull request Jan 26, 2020
* github-actions:
  Update badges (drop travis-ci and appveyor)
  Drop travis-ci CI
  Drop appveyor CI
  github actions: test and coverage
  github actions: doxygen
  Ignore truthy in yamllint (for github-actions)
  test: mark common_timeout as retriable
  cmake: set rpath for libraries on linux
  test-export: compatible with all versions of visual studio
  coverage: 'lcov --remove' need full path
azat added a commit to azat/libevent that referenced this pull request Jan 26, 2020
* github-actions:
  Update badges (drop travis-ci and appveyor)
  Drop travis-ci CI
  Drop appveyor CI
  github actions: test and coverage
  github actions: doxygen
  Ignore truthy in yamllint (for github-actions)
  test: mark common_timeout as retriable
  cmake: set rpath for libraries on linux
  test-export: compatible with all versions of visual studio
  coverage: 'lcov --remove' need full path
azat added a commit to azat/libevent that referenced this pull request Jan 26, 2020
* github-actions-v2:
  travis: disable doxygen and coveralls, in favor of github actions
  github actions: test and coverage
  github actions: doxygen
  Ignore truthy in yamllint (for github-actions)
  test: mark common_timeout as retriable
  cmake: set rpath for libraries on linux
  test-export: compatible with all versions of visual studio
  coverage: 'lcov --remove' need full path
@azat azat merged commit 19a5516 into libevent:master Jan 26, 2020
@azat
Copy link
Member
azat commented Jan 26, 2020

@ygj6 merged (thanks a lot for looking into this!)

P.S. I decided to leave the travis-ci (with disabled coveralls/doxygem)/appveyor for awhile

azat added a commit that referenced this pull request May 4, 2020
Actually right now github's VMs is better then travis/appveyor.
azat added a commit to azat/libevent that referenced this pull request May 5, 2020
Fixes: 28eb0d9 ("github actions looks good - drop travis/appveyor (libevent#951)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Convert travis-ci/appveyor to github actions
2 participants
0