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
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
14 # TODO: Use actions/upload-artifact and actions/download-artifact to simplify deployment.
15 # TODO: Use composite actions to refactor redundant code.
17 name: Continuous Deployment
27 runs-on: ${{matrix.os.genus}}
31 os: [{genus: ubuntu-20.04, family: linux}]
32 compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
33 cmake_build_type: [Debug, Release]
35 - uses: actions/checkout@v2
36 - uses: actions/setup-python@v2
39 - name: Install Ubuntu Package Dependencies
41 sudo apt-get -qq update
42 sudo apt-get install -y clang-6.0
43 - name: Install GoogleTest
45 # check out pre-breakage version of googletest; can be deleted when
47 # git clone --depth=1 https://github.com/google/googletest.git External/googletest
48 mkdir -p External/googletest
49 cd External/googletest
51 git remote add origin https://github.com/google/googletest.git
52 git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
53 git reset --hard FETCH_HEAD
55 - name: Update Glslang Sources
57 ./update_glslang_sources.py
60 CC: ${{matrix.compiler.cc}}
61 CXX: ${{matrix.compiler.cxx}}
63 mkdir build && cd build
64 cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install ..
69 ctest --output-on-failure &&
70 cd ../Test && ./runtests
72 if: ${{ matrix.compiler.cc == 'clang' }}
74 ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
78 bin/glslangValidator \
80 include/glslang/**/* \
81 lib/libGenericCodeGen.a \
83 lib/libglslang-default-resource-limits.a \
85 lib/libMachineIndependent.a \
86 lib/libOGLCompiler.a \
87 lib/libOSDependent.a \
89 lib/libSPVRemapper.a \
90 lib/libSPIRV-Tools.a \
91 lib/libSPIRV-Tools-opt.a
93 if: ${{ matrix.compiler.cc == 'clang' }}
95 ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
96 uses: actions/github-script@v5
99 const script = require('.github/workflows/deploy.js')
100 await script({github, context, core})
103 runs-on: ${{matrix.os.genus}}
107 os: [{genus: macos-11, family: osx}]
108 compiler: [{cc: clang, cxx: clang++}]
109 cmake_build_type: [Debug, Release]
111 - uses: actions/checkout@v2
112 - uses: actions/setup-python@v2
114 python-version: '3.7'
115 - name: Install GoogleTest
117 # check out pre-breakage version of googletest; can be deleted when
118 # issue 3128 is fixed
119 # git clone --depth=1 https://github.com/google/googletest.git External/googletest
120 mkdir -p External/googletest
121 cd External/googletest
123 git remote add origin https://github.com/google/googletest.git
124 git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
125 git reset --hard FETCH_HEAD
127 - name: Update Glslang Sources
129 ./update_glslang_sources.py
132 CC: ${{matrix.compiler.cc}}
133 CXX: ${{matrix.compiler.cxx}}
135 mkdir build && cd build
136 cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install ..
141 ctest --output-on-failure &&
142 cd ../Test && ./runtests
145 ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
149 bin/glslangValidator \
151 include/glslang/**/* \
152 lib/libGenericCodeGen.a \
154 lib/libglslang-default-resource-limits.a \
156 lib/libMachineIndependent.a \
157 lib/libOGLCompiler.a \
158 lib/libOSDependent.a \
160 lib/libSPVRemapper.a \
161 lib/libSPIRV-Tools.a \
162 lib/libSPIRV-Tools-opt.a
165 ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
166 uses: actions/github-script@v5
169 const script = require('.github/workflows/deploy.js')
170 await script({github, context, core})