Skip to content

Commit 4af9603

Browse files
authored
Merge pull request #3 from KhronosGroup/master
Update
2 parents d65c200 + 6624e13 commit 4af9603

File tree

275 files changed

+49014
-35378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

275 files changed

+49014
-35378
lines changed
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# NOTE: This workflow was ported from Travis.
2+
# Travis was using Ubuntu 14.04. Ubuntu 14.04 is not supportted by GitHub workflows. Ubuntu 20.04 is recommended.
3+
# Travis was using Clang 3.6. The earliest version support by Ubuntu 20.04 is Clang 6.0.
4+
# Travis was caching the clang package. APT package caching is not natively supported by GitHub actions/cache.
5+
# Travis was using Mac OS X 10.13.6 / Xcode 9.4.1 / LLVM 9.1.0
6+
7+
# NOTE: The following documentation may be useful to maintainers of this workflow.
8+
# Github actions: https://docs.github.com/en/actions
9+
# Github github-script action: https://github.com/actions/github-script
10+
# GitHub REST API: https://docs.github.com/en/rest
11+
# Octokit front-end to the GitHub REST API: https://octokit.github.io/rest.js/v18
12+
# Octokit endpoint methods: https://github.com/octokit/plugin-rest-endpoint-methods.js/tree/master/docs/repos
13+
14+
# TODO: Use actions/upload-artifact and actions/download-artifact to simplify deployment.
15+
# TODO: Use composite actions to refactor redundant code.
16+
17+
name: Continuous Deployment
18+
19+
on:
20+
workflow_dispatch:
21+
push:
22+
branches:
23+
- master
24+
25+
jobs:
26+
linux:
27+
runs-on: ${{matrix.os.genus}}
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
os: [{genus: ubuntu-20.04, family: linux}]
32+
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
33+
cmake_build_type: [Debug, Release]
34+
steps:
35+
- uses: actions/checkout@v2
36+
- uses: actions/setup-python@v2
37+
with:
38+
python-version: '3.7'
39+
- name: Install Ubuntu Package Dependencies
40+
run: |
41+
sudo apt-get -qq update
42+
sudo apt-get install -y clang-6.0
43+
- name: Install GoogleTest
44+
run: |
45+
# check out pre-breakage version of googletest; can be deleted when
46+
# issue 3128 is fixed
47+
# git clone --depth=1 https://github.com/google/googletest.git External/googletest
48+
mkdir -p External/googletest
49+
cd External/googletest
50+
git init
51+
git remote add origin https://github.com/google/googletest.git
52+
git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
53+
git reset --hard FETCH_HEAD
54+
cd ../..
55+
- name: Update Glslang Sources
56+
run: |
57+
./update_glslang_sources.py
58+
- name: Build
59+
env:
60+
CC: ${{matrix.compiler.cc}}
61+
CXX: ${{matrix.compiler.cxx}}
62+
run: |
63+
mkdir build && cd build
64+
cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install ..
65+
make -j4 install
66+
- name: Test
67+
run: |
68+
cd build
69+
ctest --output-on-failure &&
70+
cd ../Test && ./runtests
71+
- name: Zip
72+
if: ${{ matrix.compiler.cc == 'clang' }}
73+
env:
74+
ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
75+
run: |
76+
cd build/install
77+
zip ${ARCHIVE} \
78+
bin/glslangValidator \
79+
include/glslang/* \
80+
lib/libGenericCodeGen${SUFFIX}.a \
81+
lib/libglslang${SUFFIX}.a \
82+
lib/libglslang-default-resource-limits${SUFFIX}.a \
83+
lib/libHLSL${SUFFIX}.a \
84+
lib/libMachineIndependent${SUFFIX}.a \
85+
lib/libOGLCompiler${SUFFIX}.a \
86+
lib/libOSDependent${SUFFIX}.a \
87+
lib/libSPIRV${SUFFIX}.a \
88+
lib/libSPVRemapper${SUFFIX}.a \
89+
lib/libSPIRV-Tools${SUFFIX}.a \
90+
lib/libSPIRV-Tools-opt${SUFFIX}.a
91+
- name: Deploy
92+
if: ${{ matrix.compiler.cc == 'clang' }}
93+
env:
94+
ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
95+
uses: actions/github-script@v5
96+
with:
97+
script: |
98+
const script = require('.github/workflows/deploy.js')
99+
await script({github, context, core})
100+
101+
macos:
102+
runs-on: ${{matrix.os.genus}}
103+
strategy:
104+
fail-fast: false
105+
matrix:
106+
os: [{genus: macos-10.15, family: osx}]
107+
compiler: [{cc: clang, cxx: clang++}]
108+
cmake_build_type: [Debug, Release]
109+
steps:
110+
- uses: actions/checkout@v2
111+
- uses: actions/setup-python@v2
112+
with:
113+
python-version: '3.7'
114+
- name: Install GoogleTest
115+
run: |
116+
# check out pre-breakage version of googletest; can be deleted when
117+
# issue 3128 is fixed
118+
# git clone --depth=1 https://github.com/google/googletest.git External/googletest
119+
mkdir -p External/googletest
120+
cd External/googletest
121+
git init
122+
git remote add origin https://github.com/google/googletest.git
123+
git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
124+
git reset --hard FETCH_HEAD
125+
cd ../..
126+
- name: Update Glslang Sources
127+
run: |
128+
./update_glslang_sources.py
129+
- name: Build
130+
env:
131+
CC: ${{matrix.compiler.cc}}
132+
CXX: ${{matrix.compiler.cxx}}
133+
run: |
134+
mkdir build && cd build
135+
cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install ..
136+
make -j4 install
137+
- name: Test
138+
run: |
139+
cd build
140+
ctest --output-on-failure &&
141+
cd ../Test && ./runtests
142+
- name: Zip
143+
env:
144+
ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
145+
run: |
146+
cd build/install
147+
zip ${ARCHIVE} \
148+
bin/glslangValidator \
149+
include/glslang/* \
150+
lib/libGenericCodeGen${SUFFIX}.a \
151+
lib/libglslang${SUFFIX}.a \
152+
lib/libglslang-default-resource-limits${SUFFIX}.a \
153+
lib/libHLSL${SUFFIX}.a \
154+
lib/libMachineIndependent${SUFFIX}.a \
155+
lib/libOGLCompiler${SUFFIX}.a \
156+
lib/libOSDependent${SUFFIX}.a \
157+
lib/libSPIRV${SUFFIX}.a \
158+
lib/libSPVRemapper${SUFFIX}.a \
159+
lib/libSPIRV-Tools${SUFFIX}.a \
160+
lib/libSPIRV-Tools-opt${SUFFIX}.a
161+
- name: Deploy
162+
env:
163+
ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
164+
uses: actions/github-script@v5
165+
with:
166+
script: |
167+
const script = require('.github/workflows/deploy.js')
168+
await script({github, context, core})
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# NOTE: This workflow was ported from Travis.
2+
# Travis was using Ubuntu 14.04. Ubuntu 14.04 is not supportted by GitHub workflows. Ubuntu 20.04 is recommended.
3+
# Travis was using Clang 3.6. The earliest version support by Ubuntu 20.04 is Clang 6.0.
4+
# Travis was caching the clang package. APT package caching is not natively supported by GitHub actions/cache.
5+
# Travis was using Mac OS X 10.13.6 / Xcode 9.4.1 / LLVM 9.1.0
6+
#
7+
name: Continuous Integration
8+
9+
on:
10+
workflow_dispatch:
11+
pull_request:
12+
branches:
13+
- master
14+
15+
jobs:
16+
linux:
17+
runs-on: ${{matrix.os}}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-20.04]
22+
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
23+
cmake_build_type: [Debug, Release]
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-python@v2
27+
with:
28+
python-version: '3.7'
29+
- name: Install Ubuntu Package Dependencies
30+
run: |
31+
sudo apt-get -qq update
32+
sudo apt-get install -y clang-6.0
33+
- name: Install GoogleTest
34+
run: |
35+
# check out pre-breakage version of googletest; can be deleted when
36+
# issue 3128 is fixed
37+
# git clone --depth=1 https://github.com/google/googletest.git External/googletest
38+
mkdir -p External/googletest
39+
cd External/googletest
40+
git init
41+
git remote add origin https://github.com/google/googletest.git
42+
git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
43+
git reset --hard FETCH_HEAD
44+
cd ../..
45+
- name: Update Glslang Sources
46+
run: |
47+
./update_glslang_sources.py
48+
- name: Build
49+
env:
50+
CC: ${{matrix.compiler.cc}}
51+
CXX: ${{matrix.compiler.cxx}}
52+
run: |
53+
mkdir build && cd build
54+
cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install ..
55+
make -j4 install
56+
- name: Test
57+
run: |
58+
cd build
59+
ctest --output-on-failure &&
60+
cd ../Test && ./runtests
61+
62+
macos:
63+
runs-on: ${{matrix.os}}
64+
strategy:
65+
fail-fast: false
66+
matrix:
67+
os: [macos-10.15]
68+
compiler: [{cc: clang, cxx: clang++}]
69+
cmake_build_type: [Debug, Release]
70+
steps:
71+
- uses: actions/checkout@v2
72+
- uses: actions/setup-python@v2
73+
with:
74+
python-version: '3.7'
75+
- name: Install GoogleTest
76+
run: |
77+
# check out pre-breakage version of googletest; can be deleted when
78+
# issue 3128 is fixed
79+
# git clone --depth=1 https://github.com/google/googletest.git External/googletest
80+
mkdir -p External/googletest
81+
cd External/googletest
82+
git init
83+
git remote add origin https://github.com/google/googletest.git
84+
git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
85+
git reset --hard FETCH_HEAD
86+
cd ../..
87+
- name: Update Glslang Sources
88+
run: |
89+
./update_glslang_sources.py
90+
- name: Build
91+
env:
92+
CC: ${{matrix.compiler.cc}}
93+
CXX: ${{matrix.compiler.cxx}}
94+
run: |
95+
mkdir build && cd build
96+
cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install ..
97+
make -j4 install
98+
- name: Test
99+
run: |
100+
cd build
101+
ctest --output-on-failure &&
102+
cd ../Test && ./runtests
103+
104+
android:
105+
runs-on: ${{matrix.os}}
106+
strategy:
107+
fail-fast: false
108+
matrix:
109+
os: [ubuntu-20.04]
110+
compiler: [{cc: clang, cxx: clang++}]
111+
cmake_build_type: [Release]
112+
steps:
113+
- uses: actions/checkout@v2
114+
- uses: actions/setup-python@v2
115+
with:
116+
python-version: '3.7'
117+
- name: Install Ubuntu Package Dependencies
118+
if: ${{matrix.os == 'ubuntu-20.04'}}
119+
run: |
120+
sudo apt-get -qq update
121+
sudo apt-get install -y clang-6.0
122+
- name: Install Android NDK
123+
run: |
124+
export ANDROID_NDK=$HOME/android-ndk
125+
git init $ANDROID_NDK
126+
pushd $ANDROID_NDK
127+
git remote add dneto0 https://github.com/dneto0/android-ndk.git
128+
git fetch --depth=1 dneto0 r17b-strip
129+
git checkout FETCH_HEAD
130+
popd
131+
- name: Install GoogleTest
132+
run: |
133+
# check out pre-breakage version of googletest; can be deleted when
134+
# issue 3128 is fixed
135+
# git clone --depth=1 https://github.com/google/googletest.git External/googletest
136+
mkdir -p External/googletest
137+
cd External/googletest
138+
git init
139+
git remote add origin https://github.com/google/googletest.git
140+
git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
141+
git reset --hard FETCH_HEAD
142+
cd ../..
143+
- name: Update Glslang Sources
144+
run: |
145+
./update_glslang_sources.py
146+
- name: Build
147+
env:
148+
CC: ${{matrix.compiler.cc}}
149+
CXX: ${{matrix.compiler.cxx}}
150+
run: |
151+
export ANDROID_NDK=$HOME/android-ndk
152+
export TOOLCHAIN_PATH=$ANDROID_NDK/build/cmake/android.toolchain.cmake
153+
echo $ANDROID_NDK
154+
echo $TOOLCHAIN_PATH
155+
mkdir build && cd build
156+
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH} -DANDROID_NATIVE_API_LEVEL=android-14 -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DANDROID_ABI="armeabi-v7a with NEON" -DBUILD_TESTING=OFF ..
157+
make -j4

0 commit comments

Comments
 (0)