-
Notifications
You must be signed in to change notification settings - Fork 130
Migration of build pipeline to GitHub actions #514
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
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ae75a40
Initial GitHub Actions CPP ProtoBuf Build
pmai 72a2ba1
Add Python ProtoBuf build
pmai ff2ef96
Add documentation generation
pmai 33c4e2b
Add Proto3 Test Builds
pmai 1cb802f
Adjust version number for Doxygen documentation
pmai 707d4f8
Update Build status badge to GitHub Actions CI
pmai 62365c3
added deploy to gh-pages and update to current protobuf version
1489f9a
preparation of badge address to target repo
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| name: ProtoBuf CI Builds | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| build-proto2-linux64: | ||
| name: Build Proto2 Linux 64 | ||
|
|
||
| runs-on: ubuntu-18.04 | ||
|
|
||
| steps: | ||
| - name: Checkout OSI | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: '3.7' | ||
|
|
||
| - name: Install Python Dependencies | ||
| run: python -m pip install --upgrade pip setuptools wheel pyyaml | ||
|
|
||
| - name: Install Doxygen | ||
| run: sudo apt-get install doxygen graphviz | ||
|
|
||
| - name: Cache Dependencies | ||
| id: cache-depends | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: protobuf-3.15.8 | ||
| key: ${{ runner.os }}-v1-depends | ||
|
|
||
| - name: Download ProtoBuf | ||
| if: steps.cache-depends.outputs.cache-hit != 'true' | ||
| run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protobuf-all-3.15.8.tar.gz && tar xzvf protobuf-all-3.15.8.tar.gz | ||
|
|
||
| - name: Build ProtoBuf | ||
| if: steps.cache-depends.outputs.cache-hit != 'true' | ||
| working-directory: protobuf-3.15.8 | ||
| run: ./configure DIST_LANG=cpp --prefix=/usr && make | ||
|
|
||
| - name: Install ProtoBuf | ||
| working-directory: protobuf-3.15.8 | ||
| run: sudo make install && sudo ldconfig | ||
|
|
||
| - name: Install proto2cpp | ||
| run: git clone --depth 1 https://github.com/OpenSimulationInterface/proto2cpp.git | ||
|
|
||
| - name: Prepare C++ Build | ||
| run: mkdir build | ||
|
|
||
| - name: Prepare Documentation Bukd | ||
| run: | | ||
| sed -i 's/@VERSION_PATCH@/@VERSION_PATCH@_GitHub_MasterBranch/g' doxygen_config.cmake.in | ||
| echo "EXCLUDE_PATTERNS = */osi3/* */protobuf-3.15.8/* */proto2cpp/*" >> doxygen_config.cmake.in | ||
| echo "GENERATE_TREEVIEW = YES" >> doxygen_config.cmake.in | ||
|
|
||
| - name: Configure C++ Build | ||
| working-directory: build | ||
| run: cmake -D FILTER_PROTO2CPP_PY_PATH=$GITHUB_WORKSPACE/proto2cpp .. | ||
|
|
||
| - name: Build C++ | ||
| working-directory: build | ||
| run: cmake --build . --config Release -j 4 | ||
|
|
||
| - name: Build Python | ||
| run: python setup.py build && python setup.py sdist | ||
|
|
||
| - name: Install Python | ||
| run: python -m pip install . | ||
|
|
||
| - name: Run Python Tests | ||
| run: python -m unittest discover tests | ||
|
|
||
| - name: Archive Documentation | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: linux64-doc | ||
| path: doc/html | ||
| if-no-files-found: error | ||
|
|
||
| - name: deploy to gh-pages if push to master branch | ||
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | ||
| uses: peaceiris/actions-gh-pages@v3 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: ./doc/html | ||
|
|
||
| build-proto3-linux64: | ||
| name: Build Proto3 Linux 64 | ||
|
|
||
| runs-on: ubuntu-18.04 | ||
|
|
||
| steps: | ||
| - name: Checkout OSI | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: '3.7' | ||
|
|
||
| - name: Install Python Dependencies | ||
| run: python -m pip install --upgrade pip setuptools wheel pyyaml | ||
|
|
||
| - name: Cache Dependencies | ||
| id: cache-depends | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: protobuf-3.15.8 | ||
| key: ${{ runner.os }}-v1-depends | ||
|
|
||
| - name: Download ProtoBuf | ||
| if: steps.cache-depends.outputs.cache-hit != 'true' | ||
| run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protobuf-all-3.15.8.tar.gz && tar xzvf protobuf-all-3.15.8.tar.gz | ||
|
|
||
| - name: Build ProtoBuf | ||
| if: steps.cache-depends.outputs.cache-hit != 'true' | ||
| working-directory: protobuf-3.15.8 | ||
| run: ./configure DIST_LANG=cpp --prefix=/usr && make | ||
|
|
||
| - name: Install ProtoBuf | ||
| working-directory: protobuf-3.15.8 | ||
| run: sudo make install && sudo ldconfig | ||
|
|
||
| - name: Prepare C++ Build | ||
| run: mkdir build | ||
|
|
||
| - name: Switch to Proto3 Syntax | ||
| run: | | ||
| bash convert-to-proto3.sh | ||
| rm *.pb2 | ||
|
|
||
| - name: Configure C++ Build | ||
| working-directory: build | ||
| run: cmake .. | ||
|
|
||
| - name: Build C++ | ||
| working-directory: build | ||
| run: cmake --build . --config Release -j 4 | ||
|
|
||
| - name: Build Python | ||
| run: python setup.py build && python setup.py sdist | ||
|
|
||
| - name: Install Python | ||
| run: python -m pip install . | ||
|
|
||
| - name: Run Python Tests | ||
| run: python -m unittest discover tests |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.