forked from aldebaran/urbi
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github workflows: clang static build
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,39 @@ | ||
name: Linux | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
#pull_request: | ||
# branches: [ "master" ] | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: dependencies | ||
run: sudo apt-get install -y clang libc++ wget | ||
- name: Version | ||
run: cd $GITHUB_WORKSPACE && git describe --always > /tmp/version.txt | ||
- name: Boost | ||
run: cd $GITHUB_WORKSPACE && mkdir _boost && cd _boost && wget https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.bz2 && tar xf boost_1_82_0.tar.bz2 && cd boost_1_82_0 && ./bootstrap.sh && ./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" link=static install --prefix=$GITHUB_WORKSPACE/boostinst | ||
- name: Configure | ||
run: mkdir $GITHUB_WORKSPACE/build && cd $GITHUB_WORKSPACE/build && BOOST_ROOT=$GITHUB_WORKSPACE/boostinst/ cmake -D CMAKE_INCLUDE_PATH=$GITHUB_WORKSPACE/boostinst/include -D CMAKE_LIBRARY_PATH=$GITHUB_WORKSPACE/boostinst/lib -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_CXX_STANDARD=17 -D CMAKE_CXX_FLAGS="-stdlib=libc++ -fno-delete-null-pointer-checks -fPIC" -DSTATIC_BUILD=On -DWITH_EMBED=On -DBoost_NO_SYSTEM_PATHS=On -DCMAKE_INSTALL_PREFIX=/tmp/urbisdk -DCMAKE_BUILD_TYPE=Release -DBoost_USE_STATIC_LIBS=On .. | ||
- name: Build | ||
# Build your program with the given configuration | ||
run: cd $GITHUB_WORKSPACE/build && make -j $(nproc) | ||
- name: Install | ||
# Build your program with the given configuration | ||
run: cd $GITHUB_WORKSPACE/build && make install -j $(nproc) | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: urbisdk-linux-clang-static | ||
path: /tmp/urbisdk |