Skip to content

Commit

Permalink
Use container env to simplify steps environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu committed Dec 25, 2019
1 parent 8fb5683 commit 8f7f555
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,48 +20,39 @@ jobs:
- ubuntu1804
container:
image: vesoft/nebula-dev:${{ matrix.tag }}
env:
NEBULA_DEP_BIN: /opt/nebula/third-party/bin
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
options: --mount type=tmpfs,destination=/data/ccache,tmpfs-size=1073741824
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Cache
uses: actions/cache@v1
- uses: actions/cache@v1
with:
path: /data/ccache
key: ccache-gcc-${{ matrix.tag }}
restore-keys: |
ccache-gcc-
ccache-
- name: cmake
env:
NEBULA_DEP_BIN: /opt/nebula/third-party/bin
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
run: |
mkdir _build && cd _build
${NEBULA_DEP_BIN}/cmake -DCMAKE_C_COMPILER=${NEBULA_DEP_BIN}/gcc -DCMAKE_CXX_COMPILER=${NEBULA_DEP_BIN}/g++ -DCMAKE_BUILD_TYPE=Release ..
shell: bash
- name: make
env:
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
run: |
cd _build && make -j $(nproc)
shell: bash
- name: test in multithreads
timeout-minutes: 20
env:
NEBULA_DEP_BIN: /opt/nebula/third-party/bin
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
run: |
cd _build
${NEBULA_DEP_BIN}/ctest -j $(nproc) --output-on-failure
shell: bash
- name: test in singlethread
if: failure()
timeout-minutes: 40
env:
NEBULA_DEP_BIN: /opt/nebula/third-party/bin
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
run: |
cd _build
${NEBULA_DEP_BIN}/ctest --output-on-failure
Expand All @@ -76,6 +67,9 @@ jobs:
- ubuntu1804
container:
image: vesoft/nebula-dev:${{ matrix.tag }}
env:
NEBULA_DEP_BIN: /opt/nebula/third-party/bin
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
options: --mount type=tmpfs,destination=/data/ccache,tmpfs-size=1073741824
steps:
- uses: actions/checkout@v1
Expand All @@ -89,34 +83,23 @@ jobs:
ccache-clang-
ccache-
- name: cmake
env:
NEBULA_DEP_BIN: /opt/nebula/third-party/bin
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
run: |
mkdir _build && cd _build
${NEBULA_DEP_BIN}/cmake -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_C_COMPILER=clang-8 -DENABLE_ASAN=on -DENABLE_UBSAN=on ..
shell: bash
- name: make
env:
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
run: |
cd _build && make -j $(nproc)
shell: bash
- name: test in multithreads
timeout-minutes: 20
env:
NEBULA_DEP_BIN: /opt/nebula/third-party/bin
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
run: |
cd _build
${NEBULA_DEP_BIN}/ctest -j $(nproc) --output-on-failure
shell: bash
- name: test in singlethread
if: failure()
timeout-minutes: 40
env:
NEBULA_DEP_BIN: /opt/nebula/third-party/bin
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:${LIBRARY_PATH}
run: |
cd _build
${NEBULA_DEP_BIN}/ctest --output-on-failure
Expand Down

0 comments on commit 8f7f555

Please sign in to comment.