mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-10-31 18:48:11 +08:00 
			
		
		
		
	Merge workflows. (#234)
- Merge all the workflows into one file. - Produce Windows and MacOS artifact.
This commit is contained in:
		 Arthur Sonzogni
					Arthur Sonzogni
				
			
				
					committed by
					
						 ArthurSonzogni
						ArthurSonzogni
					
				
			
			
				
	
			
			
			 ArthurSonzogni
						ArthurSonzogni
					
				
			
						parent
						
							026a005753
						
					
				
				
					commit
					4188ee2c04
				
			
							
								
								
									
										161
									
								
								.github/workflows/build.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										161
									
								
								.github/workflows/build.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,161 @@ | ||||
| name: Build | ||||
|  | ||||
| on: | ||||
|   create: | ||||
|     tags: | ||||
|       -v* | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - master | ||||
|  | ||||
| jobs: | ||||
|   test: | ||||
|     name: "Tests" | ||||
|     strategy: | ||||
|       matrix: | ||||
|         include: | ||||
|           - name: Linux GCC | ||||
|             os: ubuntu-latest | ||||
|             compiler: g++-9 | ||||
|             test: true | ||||
|  | ||||
|           - name: Linux Clang | ||||
|             os: ubuntu-latest | ||||
|             compiler: clang++ | ||||
|             test: true | ||||
|  | ||||
|           - name: MacOS clang | ||||
|             os: macos-latest | ||||
|             compiler: clang++ | ||||
|             test: true | ||||
|  | ||||
|           - name: Windows MSVC | ||||
|             os: windows-latest | ||||
|             compiler: cl | ||||
|             test: false | ||||
|  | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     steps: | ||||
|       - name: "Checkout repository" | ||||
|         uses: actions/checkout@v2 | ||||
|  | ||||
|       - name: "Enable MSVC command prompt" | ||||
|         if: matrix.os == 'windows-latest' | ||||
|         uses: ilammy/msvc-dev-cmd@v1 | ||||
|  | ||||
|       - name: "Install cmake" | ||||
|         uses: lukka/get-cmake@latest | ||||
|  | ||||
|       - name: "Build debug mode" | ||||
|         run: > | ||||
|           mkdir build; | ||||
|           cd build; | ||||
|           cmake .. | ||||
|           -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} | ||||
|           -DFTXUI_BUILD_DOCS=OFF | ||||
|           -DFTXUI_BUILD_EXAMPLES=ON | ||||
|           -DFTXUI_BUILD_TESTS=ON | ||||
|           -DFTXUI_BUILD_TESTS_FUZZER=OFF | ||||
|           -DFTXUI_ENABLE_INSTALL=ON ; | ||||
|           cmake --build . --config Debug; | ||||
|  | ||||
|       - name: "Run tests" | ||||
|         if: matrix.test | ||||
|         run: > | ||||
|           cd build; | ||||
|           ./tests | ||||
|  | ||||
|   # Create a release on new v* tags | ||||
|   release: | ||||
|     needs: test | ||||
|     if: ${{ github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') }} | ||||
|     name: "Create release" | ||||
|     runs-on: ubuntu-latest | ||||
|     outputs: | ||||
|       upload_url: ${{ steps.create_release.outputs.upload_url }} | ||||
|     steps: | ||||
|       - name: "Create release" | ||||
|         uses: softprops/action-gh-release@v1 | ||||
|         id: create_release | ||||
|         with: | ||||
|           draft: true | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|  | ||||
|   # Build artifact for the release | ||||
|   package: | ||||
|     name: "Build packages" | ||||
|     needs: release | ||||
|     strategy: | ||||
|       matrix: | ||||
|         include: | ||||
|           - os: ubuntu-latest | ||||
|             asset_path: build/ftxui*Linux* | ||||
|           - os: macos-latest | ||||
|             asset_path: build/ftxui*Darwin* | ||||
|           - os: windows-latest | ||||
|             asset_path: build/ftxui*Win64* | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     steps: | ||||
|       - name: "Checkout repository" | ||||
|         uses: actions/checkout@v2 | ||||
|  | ||||
|       - name: "Install cmake" | ||||
|         uses: lukka/get-cmake@latest | ||||
|  | ||||
|       - name: "Build packages" | ||||
|         run: > | ||||
|           mkdir build; | ||||
|           cd build; | ||||
|           cmake .. | ||||
|           -DCMAKE_BUILD_TYPE=Release | ||||
|           -DFTXUI_BUILD_DOCS=OFF | ||||
|           -DFTXUI_BUILD_EXAMPLES=OFF | ||||
|           -DFTXUI_BUILD_TESTS=OFF | ||||
|           -DFTXUI_BUILD_TESTS_FUZZER=OFF | ||||
|           -DFTXUI_ENABLE_INSTALL=ON; | ||||
|           cmake --build . --target package; | ||||
|       - uses: shogo82148/actions-upload-release-asset@v1 | ||||
|         with: | ||||
|           upload_url: ${{ needs.release.outputs.upload_url }} | ||||
|           asset_path: ${{ matrix.asset_path }} | ||||
|           overwrite: true | ||||
|    | ||||
|   documentation: | ||||
|     needs: package | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: "Checkout repository" | ||||
|         uses: actions/checkout@v2 | ||||
|  | ||||
|       - name: "Install cmake" | ||||
|         uses: lukka/get-cmake@latest | ||||
|  | ||||
|       - name: "Install emsdk" | ||||
|         uses: mymindstorm/setup-emsdk@v7 | ||||
|  | ||||
|       - name: "Install Doxygen/Graphviz" | ||||
|         run: > | ||||
|           sudo apt-get update; | ||||
|           sudo apt-get install doxygen graphviz; | ||||
|  | ||||
|       - name: "Build documentation" | ||||
|         run: > | ||||
|           mkdir build; | ||||
|           cd build; | ||||
|           emcmake cmake ..; | ||||
|           cmake --build . --target doc; | ||||
|           rsync -amv --include='*/' --include='*.html' --include='*.js' --include='*.wasm' --exclude='*' examples doc/doxygen/html; | ||||
|  | ||||
|       - name: "Deploy" | ||||
|         uses: peaceiris/actions-gh-pages@v3 | ||||
|         with: | ||||
|           github_token: ${{ secrets.GITHUB_TOKEN }} | ||||
|           publish_dir: build/doc/doxygen/html/ | ||||
|           enable_jekyll: false | ||||
|           allow_empty_commit: false | ||||
|           force_orphan: true | ||||
|           publish_branch: gh-pages | ||||
							
								
								
									
										71
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										71
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,71 +0,0 @@ | ||||
| # For most projects, this workflow file will not need changing; you simply need | ||||
| # to commit it to your repository. | ||||
| # | ||||
| # You may wish to alter this file to override the set of languages analyzed, | ||||
| # or to provide custom queries or build logic. | ||||
| # | ||||
| # ******** NOTE ******** | ||||
| # We have attempted to detect the languages in your repository. Please check | ||||
| # the `language` matrix defined below to confirm you have the correct set of | ||||
| # supported CodeQL languages. | ||||
| # | ||||
| name: "CodeQL" | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: [ master ] | ||||
|   pull_request: | ||||
|     # The branches below must be a subset of the branches above | ||||
|     branches: [ master ] | ||||
|   schedule: | ||||
|     - cron: '38 7 * * 4' | ||||
|  | ||||
| jobs: | ||||
|   analyze: | ||||
|     name: Analyze | ||||
|     runs-on: ubuntu-latest | ||||
|     permissions: | ||||
|       actions: read | ||||
|       contents: read | ||||
|       security-events: write | ||||
|  | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         language: [ 'cpp' ] | ||||
|         # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||||
|         # Learn more: | ||||
|         # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||||
|  | ||||
|     steps: | ||||
|     - name: Checkout repository | ||||
|       uses: actions/checkout@v2 | ||||
|  | ||||
|     # Initializes the CodeQL tools for scanning. | ||||
|     - name: Initialize CodeQL | ||||
|       uses: github/codeql-action/init@v1 | ||||
|       with: | ||||
|         languages: ${{ matrix.language }} | ||||
|         # If you wish to specify custom queries, you can do so here or in a config file. | ||||
|         # By default, queries listed here will override any specified in a config file. | ||||
|         # Prefix the list here with "+" to use these queries and those in the config file. | ||||
|         # queries: ./path/to/local/query, your-org/your-repo/queries@main | ||||
|  | ||||
|     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java). | ||||
|     # If this step fails, then you should remove it and run the build manually (see below) | ||||
|     - name: Autobuild | ||||
|       uses: github/codeql-action/autobuild@v1 | ||||
|  | ||||
|     # ℹ️ Command-line programs to run using the OS shell. | ||||
|     # 📚 https://git.io/JvXDl | ||||
|  | ||||
|     # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||||
|     #    and modify them (or add more) to build your code if your project | ||||
|     #    uses a compiled language | ||||
|  | ||||
|     #- run: | | ||||
|     #   make bootstrap | ||||
|     #   make release | ||||
|  | ||||
|     - name: Perform CodeQL Analysis | ||||
|       uses: github/codeql-action/analyze@v1 | ||||
							
								
								
									
										31
									
								
								.github/workflows/linux-clang.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								.github/workflows/linux-clang.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -1,31 +0,0 @@ | ||||
| name: Linux Clang | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - master | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     name: Linux Clang | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - uses: seanmiddleditch/gha-setup-ninja@master | ||||
|       - name: Build | ||||
|         run: > | ||||
|           mkdir build; | ||||
|           cd build; | ||||
|           cmake .. | ||||
|           -DCMAKE_CXX_COMPILER=clang++ | ||||
|           -DFTXUI_BUILD_TESTS=ON; | ||||
|           cmake --build . --config Release; | ||||
|  | ||||
|       - name: Tests | ||||
|         if: ${{ matrix.config.test }} | ||||
|         run: > | ||||
|           cd build; | ||||
|           ./tests | ||||
							
								
								
									
										51
									
								
								.github/workflows/linux-emscripten.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										51
									
								
								.github/workflows/linux-emscripten.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -1,51 +0,0 @@ | ||||
| name: Linux Emscripten | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - master | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     name: Linux Emscripten | ||||
|     runs-on: ubuntu-latest | ||||
|     env: | ||||
|       DOCUMENTATION: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - uses: seanmiddleditch/gha-setup-ninja@master | ||||
|       - uses: mymindstorm/setup-emsdk@v7 | ||||
|  | ||||
|       - name: Install Doxygen/Graphviz | ||||
|         if: fromJSON(env.DOCUMENTATION) | ||||
|         run: | | ||||
|           sudo apt-get update | ||||
|           sudo apt-get install doxygen graphviz | ||||
|  | ||||
|       - name: Build | ||||
|         run: | | ||||
|           emcmake cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -S . -B build | ||||
|           cmake --build build | ||||
|  | ||||
|       - name: Build documentation | ||||
|         if: fromJSON(env.DOCUMENTATION) | ||||
|         run: | | ||||
|           cd build | ||||
|           cmake --build . --target doc | ||||
|           # Copy emscripten built examples to the doxygen output directory for deployment | ||||
|           rsync -amv --include='*/' --include='*.html' --include='*.js' --include='*.wasm' --exclude='*' examples doc/doxygen/html | ||||
|  | ||||
|       # Deploy the HTML documentation to GitHub Pages | ||||
|       - name: GH Pages Deployment | ||||
|         if: fromJSON(env.DOCUMENTATION) | ||||
|         uses: peaceiris/actions-gh-pages@v3 | ||||
|         with: | ||||
|           github_token: ${{ secrets.GITHUB_TOKEN }} | ||||
|           publish_dir: build/doc/doxygen/html/ | ||||
|           enable_jekyll: false | ||||
|           allow_empty_commit: false | ||||
|           force_orphan: true | ||||
|           publish_branch: gh-pages | ||||
							
								
								
									
										30
									
								
								.github/workflows/linux-gcc.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/linux-gcc.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -1,30 +0,0 @@ | ||||
| name: Linux GCC | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - master | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     name: Linux GCC | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - uses: seanmiddleditch/gha-setup-ninja@master | ||||
|       - name: Build | ||||
|         run: > | ||||
|           mkdir build; | ||||
|           cd build; | ||||
|           cmake .. | ||||
|           -DCMAKE_CXX_COMPILER=g++-9 | ||||
|           -DFTXUI_BUILD_TESTS=ON; | ||||
|           cmake --build . --config Release; | ||||
|  | ||||
|       - name: Tests | ||||
|         run: > | ||||
|           cd build; | ||||
|           ./tests | ||||
							
								
								
									
										31
									
								
								.github/workflows/mac-clang.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								.github/workflows/mac-clang.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -1,31 +0,0 @@ | ||||
| name: MacOS Clang | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - master | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     name: MacOS Clang | ||||
|     runs-on: macos-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - uses: seanmiddleditch/gha-setup-ninja@master | ||||
|       - name: Build | ||||
|         run: > | ||||
|           mkdir build; | ||||
|           cd build; | ||||
|           cmake .. | ||||
|           -DCMAKE_CXX_COMPILER=clang++ | ||||
|           -DFTXUI_BUILD_TESTS=ON; | ||||
|           cmake --build . --config Release; | ||||
|  | ||||
|       - name: Tests | ||||
|         if: ${{ matrix.config.test }} | ||||
|         run: > | ||||
|           cd build; | ||||
|           ./tests | ||||
							
								
								
									
										39
									
								
								.github/workflows/release.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										39
									
								
								.github/workflows/release.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -1,39 +0,0 @@ | ||||
| name: Release | ||||
|  | ||||
| on: | ||||
|   create: | ||||
|     tags: | ||||
|       -v* | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     name: Release  | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|         with: | ||||
|           fetch-depth: 0 | ||||
|  | ||||
|       - uses: seanmiddleditch/gha-setup-ninja@master | ||||
|  | ||||
|       - name: Build | ||||
|         run: > | ||||
|           mkdir build; | ||||
|           cd build; | ||||
|           cmake .. | ||||
|           -DCMAKE_CXX_COMPILER=clang++ | ||||
|           -DFTXUI_BUILD_DOCS=OFF | ||||
|           -DFTXUI_BUILD_EXAMPLES=OFF | ||||
|           -DFTXUI_BUILD_TESTS=OFF | ||||
|           -DFTXUI_BUILD_TESTS_FUZZER=OFF | ||||
|           -DFTXUI_ENABLE_INSTALL=ON; | ||||
|           cmake --build . --config Release; | ||||
|           make package; | ||||
|  | ||||
|       - name: Upload  | ||||
|         uses: softprops/action-gh-release@v1 | ||||
|         with: | ||||
|           files: build/ftxui-* | ||||
|           draft: true | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
							
								
								
									
										32
									
								
								.github/workflows/windows-msvc.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										32
									
								
								.github/workflows/windows-msvc.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -1,32 +0,0 @@ | ||||
| name: Windows MSVC | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - master | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     name: Windows MSVC | ||||
|     runs-on: windows-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - uses: seanmiddleditch/gha-setup-ninja@master | ||||
|       - uses: ilammy/msvc-dev-cmd@v1 | ||||
|       - name: Build | ||||
|         run: > | ||||
|           mkdir build; | ||||
|           cd build; | ||||
|           cmake .. | ||||
|           -DCMAKE_CXX_COMPILER="cl" | ||||
|           -DFTXUI_BUILD_TESTS=ON; | ||||
|           cmake --build . --config Release; | ||||
|  | ||||
|       - name: Tests | ||||
|         if: ${{ matrix.config.test }} | ||||
|         run: > | ||||
|           cd build; | ||||
|           ./tests.exe | ||||
		Reference in New Issue
	
	Block a user