-
Notifications
You must be signed in to change notification settings - Fork 954
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
543cc20
commit e045e9d
Showing
1 changed file
with
132 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,132 @@ | ||
name: EASTL Build & Test Pipeline | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
checkout: | ||
name: Checkout EASTL and submodules | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: EASTL/ | ||
- run: cd EASTL/ && git submodule update --init | ||
- name: Upload checked out code | ||
uses: actions/[email protected] | ||
with: | ||
name: Code | ||
path: EASTL/ | ||
|
||
build: | ||
needs: checkout | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ windows-latest, ubuntu-latest ] | ||
compiler: [ clang, gcc, msvc ] | ||
configuration: [ Debug, Release ] | ||
exclude: | ||
- os: windows-latest | ||
compiler: gcc | ||
- os: windows-latest | ||
compiler: clang | ||
- os: ubuntu-latest | ||
compiler: msvc | ||
include: | ||
- os: windows-latest | ||
compiler: msvc | ||
cxxflags: '/std:c++20 /Zc:char8_t' | ||
- os: ubuntu-latest | ||
compiler: clang | ||
cc: 'clang-11' | ||
cxx: 'clang++-11' | ||
cxxflags: '-std=c++20' | ||
- os: ubuntu-latest | ||
compiler: gcc | ||
cc: 'gcc-10' | ||
cxx: 'g++-10' | ||
cxxflags: '-std=c++2a' | ||
|
||
name: Build EASTL | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Download a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: Code | ||
path: Code/ | ||
|
||
- run: mkdir build | ||
- run: cd build && cmake ../Code -DEASTL_BUILD_BENCHMARK:BOOL=ON -DEASTL_BUILD_TESTS:BOOL=ON | ||
env: | ||
CXXFLAGS: ${{ matrix.cxxflags }} | ||
CXX: ${{ matrix.cxx }} | ||
CC: ${{ matrix.cc }} | ||
- run: cd build && cmake --build . --config ${{ matrix.configuration }} | ||
- name: Upload binaries | ||
uses: actions/[email protected] | ||
with: | ||
name: Binaries-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.configuration }} | ||
path: build/ | ||
|
||
test: | ||
needs: build | ||
name: Run EASTL tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ windows-latest, ubuntu-latest ] | ||
compiler: [ clang, msvc, gcc ] | ||
configuration: [ Debug, Release ] | ||
exclude: | ||
- os: windows-latest | ||
compiler: gcc | ||
- os: windows-latest | ||
compiler: clang | ||
- os: ubuntu-latest | ||
compiler: msvc | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Download a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: Binaries-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.configuration }} | ||
path: Binaries/ | ||
- if: matrix.os == 'ubuntu-latest' | ||
run: chmod 755 ./Binaries/test/EASTLTest | ||
- run: cd Binaries/test && ctest -C ${{ matrix.configuration }} -V | ||
|
||
benchmark: | ||
needs: build | ||
name: Run EASTL benchmarks | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ windows-latest, ubuntu-latest ] | ||
compiler: [ clang, msvc, gcc ] | ||
configuration: [ Release ] | ||
exclude: | ||
- os: windows-latest | ||
compiler: gcc | ||
- os: windows-latest | ||
compiler: clang | ||
- os: ubuntu-latest | ||
compiler: msvc | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Download a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: Binaries-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.configuration }} | ||
path: Binaries/ | ||
- if: matrix.os == 'ubuntu-latest' | ||
run: chmod 755 ./Binaries/benchmark/EASTLBenchmarks | ||
- run: cd Binaries/benchmark && ctest -C ${{ matrix.configuration }} -V |