-
Notifications
You must be signed in to change notification settings - Fork 279
Try to use GitHub Actions #1115
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
Conversation
It looks very promising, the main roadblocker is #1111, which I think is resolved by #1114 but it looks like that we need to rebase/merge master into this PR. The other missing thing is running, tests and checks, with |
👋 incidentally I recently tried to get BAP to compile using a GH action. I tried going the
job. I'm just trying to get it running on name: LSIF
on: [push, pull_request]
jobs:
build:
name: Build and push LSIF data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: OCaml setup
uses: avsm/setup-ocaml@master
with:
ocaml-version: '4.09.0'
- run: opam depext -yt bap
- run: sudo apt-get install libcurl4-gnutls-dev # turns out depext didn't pick up this this dependency 🤷
- run: opam install -t . --deps-only
- run: opam exec -- ./configure --enable-everything
- run: opam exec -- make |
Not actually, the The main culprit why it didn't work with the P.S. Glad to see you back doing BAPish things :) |
I probably don't have much, but can share I recently went through some github actions migration recently. One thing we settled on was starting to use shell scripts since it made it easier to test. Though AFAIK, there is a run syntax for shell scripts. https://github.com/docker-practice/actions-setup-docker/blob/master/.github/workflows/ci.yaml#L32 |
@dbrumley there is already existing GitHub Action for publishing to Docker, we use it in radare2 project: https://github.com/marketplace/actions/publish-docker |
I wanted to setup also Windows worker, but strangely z3 is disabled for win32 for some reason by @fdopen in fdopen/opam-repository-mingw@7ca1bb1 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
After trying MacOS build again it seems there is a new error, and it might be in the code:
|
Ok, I've pushed the fix to #1109, reset Oleg's morning attempts and rebased the original patch onto the new master. |
Finally, we passed the test and sandboxing issues, but still failing on macos since we're picking not the installed LLVM, but the LLVM which is shipped with the os (and which is stripped and doesn't have arm,powerpc, and other targets). |
First of all, `/usr/local/opt/llvm/bin/llvm-config` is llvm-config of LLVM that is shipped with MacOS and which is stripped from any non-native targets so we can't use it. The requested llvm@9 is installed at `/usr/local/opt/llvm@9` and is not symlinked to `/usr/local` because it is keg-only: ``` llvm@9 is keg-only, which means it was not symlinked into /usr/local, because this is an alternate version of another formula. If you need to have llvm@9 first in your PATH run: echo 'export PATH="/usr/local/opt/llvm@9/bin:$PATH"' >> /Users/runner/.bash_profile For compilers to find llvm@9 you may need to set: export LDFLAGS="-L/usr/local/opt/llvm@9/lib" export CPPFLAGS="-I/usr/local/opt/llvm@9/include" ``` llvm@10 aka llvm is also keg-only so it will be installed only into the cellar. I have to guess whether the llvm-config binary will be named llvm-config or llvm-config-9, but I bet for the former.
The MacOS build looks stuck at:
BTW, good we decided to build with MacOS as well - already a few bugs were spotted. |
The master branch is already restricted from pushes so the code can reach the master branch only through a pull requested. We don't want to the same work twice. Also removes (the commented) windows line, we will return it back, once we will have time for that, see also BinaryAnalysisPlatform#512
It works! |
Finally, thanks to everyone for the hard work! This is the first step, we will move more of our infrastructure to the actions and optimize the testsuite that takes more than hour on Mac (for some unknown to us reason). But anyway, we now have a working CI system, and soon we will get CICD :) |
Travis is too clunky, also it is possible to use new action template from https://discuss.ocaml.org/t/github-actions-for-ocaml-opam-now-available/4745