Change text colors in info panel (#3377) #12390
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
name: Build Test Distribute | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: '0 17 * * *' # Run every day at 17:00 UTC | |
#- cron: '0 6 * * *' # Run every day at 6 AM UTC | |
#UPLOAD_ARTIFACTS condition: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
env: | |
VCPKG-VERSION: '2024.07.12' | |
jobs: | |
prepare-image: | |
uses: ./.github/workflows/prepare-images.yml | |
secrets: inherit | |
versioning-and-release-url: | |
uses: ./.github/workflows/versioning-release.yml | |
with: | |
version-namespace: ${{ contains(github.event.pull_request.labels.*.name, 'full-ci') && github.event_name != 'push' && 'pr-test' || '' }} | |
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
secrets: | |
BUILD_MACHINE_TOKEN: ${{ secrets.BUILD_MACHINE_TOKEN }} | |
windows-build-test: | |
needs: [ prepare-image, versioning-and-release-url ] | |
uses: ./.github/workflows/build-test-windows.yml | |
with: | |
full_config_build: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
secrets: inherit | |
ubuntu-arm64-build-test: | |
needs: [ prepare-image, versioning-and-release-url ] | |
uses: ./.github/workflows/build-test-ubuntu-arm64.yml | |
with: | |
docker_image_tag: ${{needs.prepare-image.outputs.docker_image_tag}} | |
app_version: ${{needs.versioning-and-release-url.outputs.app_version}} | |
full_config_build: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
secrets: inherit | |
ubuntu-x64-build-test: | |
needs: [ prepare-image, versioning-and-release-url ] | |
uses: ./.github/workflows/build-test-ubuntu-x64.yml | |
with: | |
docker_image_tag: ${{needs.prepare-image.outputs.docker_image_tag}} | |
app_version: ${{needs.versioning-and-release-url.outputs.app_version}} | |
full_config_build: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
secrets: inherit | |
fedora-build-test: | |
needs: [ prepare-image, versioning-and-release-url ] | |
uses: ./.github/workflows/build-test-fedora.yml | |
with: | |
docker_image_tag: ${{needs.prepare-image.outputs.docker_image_tag}} | |
app_version: ${{needs.versioning-and-release-url.outputs.app_version}} | |
full_config_build: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
secrets: inherit | |
emscripten-build-test: | |
needs: [ prepare-image, versioning-and-release-url ] | |
uses: ./.github/workflows/build-test-emscripten.yml | |
with: | |
docker_image_tag: ${{needs.prepare-image.outputs.docker_image_tag}} | |
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
macos-build-test: | |
needs: [ versioning-and-release-url ] | |
uses: ./.github/workflows/build-test-macos.yml | |
with: | |
app_version: ${{needs.versioning-and-release-url.outputs.app_version}} | |
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
secrets: inherit | |
update-win-version: | |
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
needs: | |
- windows-build-test | |
- versioning-and-release-url | |
timeout-minutes: 60 | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Checkout Vcpkg ${{env.VCPKG-VERSION}} | |
working-directory: C:\vcpkg | |
run: | | |
git fetch | |
git checkout ${{env.VCPKG-VERSION}} | |
- name: Restore Vcpkg Cache | |
uses: actions/cache@v4 | |
id: vcpkg-cache | |
with: | |
key: vcpkg-cache-${{env.VCPKG-VERSION}} | |
path: | | |
C:\vcpkg\* | |
- name: Configure AWS Credentials | |
if: ${{ env.INTERNAL_BUILD }} | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::259351611210:role/GitHubMeshLibAwsCredsRole | |
aws-region: us-east-1 | |
- name: Update vcpkg packages | |
run: | | |
.\thirdparty\install.bat --write-s3 | |
- name: Download Windows Binaries Archive | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: WindowsArchive* | |
merge-multiple: true | |
- name: Extract Windows Binaries | |
run: | | |
tar -xvzf MREDist_Release.zip | |
tar -xvzf MREDist_Debug.zip | |
- name: Make Install Folder | |
run: py -3.10 scripts\make_install_folder.py ${{needs.versioning-and-release-url.outputs.app_version}} | |
- name: Make Install Folder .NET | |
run: py -3.10 scripts\make_install_folder_dotnet.py ${{needs.versioning-and-release-url.outputs.app_version}} | |
- name: Distribute | |
run: py -3.10 scripts\zip_distribution.py install MeshLibDist.zip | |
- name: Distribute .NET | |
run: py -3.10 scripts\zip_distribution.py install_dotnet MeshLibDotNetDist.zip | |
- name: Upload Windows Distribution | |
uses: actions/upload-artifact@v4 | |
with: | |
name: DistributivesWin | |
path: MeshLibDist.zip | |
retention-days: 1 | |
- name: Upload .NET Distribution | |
uses: actions/upload-artifact@v4 | |
with: | |
name: DistributivesDotNet | |
path: MeshLibDotNetDist.zip | |
retention-days: 1 | |
create-nuget-package: | |
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
needs: | |
- windows-build-test | |
- versioning-and-release-url | |
timeout-minutes: 20 | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Download .NET Binaries Archive | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: DotNetArchive* | |
merge-multiple: true | |
- name: Extract Windows Binaries | |
run: | | |
tar -xvzf MREDist_DotNet.zip | |
- name: Generate NuGet specification | |
run: | | |
echo ${{ needs.versioning-and-release-url.outputs.app_version }} | |
py -3 scripts\generate_nuget_spec.py ${{ needs.versioning-and-release-url.outputs.app_version }} | |
- name: Download NuGet Executable | |
run: curl https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -o nuget.exe | |
- name: Build NuGet package | |
run: nuget.exe pack Package.nuspec -OutputFileNamesWithoutVersion | |
- name: Upload NuGet Package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: DistributivesNuGet | |
path: MeshLib.nupkg | |
retention-days: 1 | |
upload-distributions: | |
if: ${{ !cancelled() && ( github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') ) }} | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
needs: | |
- update-win-version | |
- create-nuget-package | |
- ubuntu-x64-build-test | |
- ubuntu-arm64-build-test | |
- fedora-build-test | |
- emscripten-build-test | |
- macos-build-test | |
- versioning-and-release-url | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Download All Developer Distributives | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: Distributives* | |
merge-multiple: true | |
failOnError: false | |
- name: Rename Distributives | |
run: | | |
shopt -s nullglob | |
for PKG_FILE in MeshLib*Dist.zip ; do | |
mv "$PKG_FILE" "${PKG_FILE/Dist/Dist_${{ needs.versioning-and-release-url.outputs.app_version }}}" | |
done | |
for PKG_FILE in MeshLib*.nupkg ; do | |
mv "$PKG_FILE" "${PKG_FILE/MeshLib/MeshLib_${{ needs.versioning-and-release-url.outputs.app_version }}}" | |
done | |
for PKG_FILE in meshlib*-dev.deb meshlib*-dev.rpm meshlib*.pkg; do | |
mv "$PKG_FILE" "${PKG_FILE/meshlib/meshlib_${{ needs.versioning-and-release-url.outputs.app_version }}}" | |
done | |
- name: Upload Distributives | |
run: | | |
shopt -s nullglob | |
PKG_FILES="MeshLib*Dist*.zip meshlib*-dev.deb meshlib*-dev.rpm meshlib*.pkg MeshLib*.nupkg" | |
if [ -n "$(echo $PKG_FILES)" ] ; then | |
echo ${{ secrets.BUILD_MACHINE_TOKEN }} | gh auth login --with-token | |
gh release upload ${{ needs.versioning-and-release-url.outputs.tag }} $PKG_FILES --clobber | |
fi | |
test-distribution: | |
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
needs: [ versioning-and-release-url, upload-distributions ] | |
uses: ./.github/workflows/test-distribution.yml | |
with: | |
release_id: ${{needs.versioning-and-release-url.outputs.release_id}} | |
update-dev-documentation: | |
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }} | |
runs-on: ubuntu-latest | |
container: | |
image: alpine:3.20 | |
needs: | |
- versioning-and-release-url | |
- windows-build-test | |
- ubuntu-x64-build-test | |
- ubuntu-arm64-build-test | |
- fedora-build-test | |
- emscripten-build-test | |
- macos-build-test | |
steps: | |
- name: Install Git | |
run: | | |
apk update | |
apk add git | |
- name: Checkout MeshLib | |
uses: actions/checkout@v4 | |
with: | |
path: 'MeshLib/' | |
- name: Checkout documentation site | |
uses: actions/checkout@v4 | |
with: | |
repository: 'MeshInspector/MeshInspector.github.io' | |
path: 'MeshInspector.github.io/' | |
token: ${{ secrets.MESHINSPECTOR_BOT_TOKEN }} | |
- name: Install Doxygen | |
run: apk add doxygen | |
- name: Run Doxygen | |
working-directory: MeshInspector.github.io | |
run: | | |
( | |
cat Doxyfile | |
echo "OUTPUT_DIRECTORY=MeshLib/dev" | |
) | doxygen - | |
- name: Commit and push changes | |
working-directory: MeshInspector.github.io | |
run: | | |
git config user.email "${{ secrets.MESHINSPECTOR_BOT_EMAIL }}@gmail.com" | |
git config user.name "meshinspector-bot" | |
git add -A | |
git commit --allow-empty -m "Auto update docs" -a | |
git push | |
update-artifacts: | |
timeout-minutes: 15 | |
runs-on: ubuntu-20.04 | |
needs: [ upload-distributions ] | |
if: always() | |
steps: | |
# all Windows | |
- name: Delete Windows Debug Install Archive artifact | |
uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: WindowsArchive* | |
failOnError: false | |
# Distributives | |
- name: Delete Distribution | |
uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: Distributives* | |
failOnError: false | |
- name: Delete Wheelhouse | |
uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: Wheelhouse* | |
failOnError: false | |
# generate timing logs archive | |
- name: Download Timing Logs Archive | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: Timing_Logs* | |
merge-multiple: true | |
- name: Generate Timing Logs Archive | |
run: | | |
shopt -s nullglob | |
if [ -n "$(echo *.csv)" ] ; then | |
tar -cvzf time_log.tar.gz *.csv | |
else | |
# create empty tar archive | |
# https://superuser.com/questions/448623/how-to-get-an-empty-tar-archive | |
tar -czf time_log.tar.gz -T /dev/null | |
fi | |
- name: Upload Timing Logs Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: time_log | |
path: time_log.tar.gz | |
retention-days: 1 | |
- name: Delete Timing Logs Source | |
uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: Timing_Logs* | |
failOnError: false |