Skip to content

Commit

Permalink
Fix compilation with a renamed nCine method
Browse files Browse the repository at this point in the history
- Use the MSYS2 installation on the Windows image of the GitHub runner
- Don't specify a path environment variable for MSYS2 on the GitHub runner
- Update Ubuntu to version 20.04 for the GitHub runner environments
- Update macOS to version 11 for the GitHub runner environment
- Use Java 11 when running Gradle for Android on the GitHub runner
- Disable CrashRpt integration for Windows on the GitHub runner
  • Loading branch information
encelo committed Sep 5, 2022
1 parent 0ee13c7 commit b7a80b8
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 25 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
ARCH: [armeabi-v7a, arm64-v8a, x86_64]
BuildType: [Debug, Release]

runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-20.04'

steps:
- name: 'Checkout Code'
Expand Down Expand Up @@ -73,6 +73,7 @@ jobs:
- name: 'Gradle Assemble'
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export PROJECT_NAME=${GITHUB_REPOSITORY##*/}
cd ../$PROJECT_NAME-build-${{ matrix.BuildType }}/android
gradle assemble${{ matrix.BuildType }}
Expand All @@ -98,7 +99,7 @@ jobs:
git reset
git clean -f
git rm * || true
mv -f ../$PROJECT_NAME-build-${{ matrix.BuildType }}/android/build/outputs/apk/*/*.apk .
mv -f ../$PROJECT_NAME-build-${{ matrix.BuildType }}/android/app/build/outputs/apk/*/*.apk .
git add *.apk
git commit --amend -m "$DEPLOY_MESSAGE" || git commit -m "$DEPLOY_MESSAGE"
git push --force || git push --set-upstream origin $DEPLOY_BRANCH
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ on: [push, workflow_dispatch]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-18.04
name: 'Analyze'
runs-on: 'ubuntu-20.04'

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]

steps:
- name: Checkout Repository
- name: 'Checkout Repository'
uses: actions/checkout@v2

- name: Initialize CodeQL
- name: 'Initialize CodeQL'
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
Expand Down Expand Up @@ -75,5 +75,5 @@ jobs:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/../nCine-external/lib
make -j2 -C ../$PROJECT_NAME-build-$BuildType
- name: Perform CodeQL Analysis
- name: 'Perform CodeQL Analysis'
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
BuildType: [Debug, Release, BinDist]

runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-20.04'

steps:
- name: 'Checkout Code'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
CC: clang
CXX: clang++

runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-20.04'

steps:
- name: 'Checkout Code'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
BuildType: [Debug, Release, BinDist]

runs-on: 'macOS-10.15'
runs-on: 'macOS-11'

steps:
- name: 'Checkout Code'
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,23 @@ jobs:
- name: 'Checkout Code'
uses: actions/checkout@v2

- name: 'Install and Update MSYS2'
- name: 'Update MSYS2'
run: |
choco install --no-progress msys2 --params="/InstallDir:C:\msys64 /NoUpdate /NoPath"
C:\msys64\usr\bin\pacman --noconfirm -Syy
$env:MSYSTEM = "MINGW64"
C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syyuu'
C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syyuu'
- name: 'Install Build Dependencies'
run: |
C:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-glew mingw-w64-x86_64-glfw mingw-w64-x86_64-SDL2 mingw-w64-x86_64-openal mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libwebp mingw-w64-x86_64-lua cmake
$env:MSYSTEM = "MINGW64"
C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-glew mingw-w64-x86_64-glfw mingw-w64-x86_64-SDL2 mingw-w64-x86_64-openal mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libwebp mingw-w64-x86_64-lua cmake'
if ("${{ matrix.CC }}" -eq "gcc") { C:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gcc }
else { C:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-clang }
if ("${{ matrix.CC }}" -eq "gcc") { C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-gcc' }
else { C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-clang' }
C:\msys64\usr\bin\pacman --noconfirm -Scc
C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Scc'
- name: 'Unshallow Git Repository for Versioning'
if: matrix.BuildType == 'BinDist'
Expand Down Expand Up @@ -108,7 +112,6 @@ jobs:
$env:CXX = "${{ matrix.CXX }}"
$env:PROJECT_NAME = Split-Path -Path "$env:GITHUB_REPOSITORY" -leaf
$env:PATH = "C:\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
$env:MSYSTEM = "MINGW64"
if ("${{ matrix.BuildType }}" -eq "BinDist")
Expand All @@ -121,7 +124,6 @@ jobs:
CHERE_INVOKING: on
run: |
$env:PROJECT_NAME = Split-Path -Path "$env:GITHUB_REPOSITORY" -leaf
$env:PATH = "C:\msys64\x86_64\bin;C:\msys64\usr\bin;$env:PATH"
$env:MSYSTEM = "MINGW64"
C:\msys64\usr\bin\bash.exe -lc 'make -j2 -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}'
Expand All @@ -132,7 +134,6 @@ jobs:
CHERE_INVOKING: on
run: |
$env:PROJECT_NAME = Split-Path -Path "$env:GITHUB_REPOSITORY" -leaf
$env:PATH = "C:\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
$env:MSYSTEM = "MINGW64"
C:\msys64\usr\bin\bash.exe -lc 'make package -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
git fetch --unshallow; if (-not $?) { return }
- name: 'Download and Build CrashRpt'
if: matrix.BuildType == 'Debug'
#if: matrix.BuildType == 'Debug'
if: false
run: |
cd ..
curl -fsSL https://sourceforge.net/projects/crashrpt/files/CrashRpt_v.1.4.3_r1645.7z/download -o CrashRpt.7z
Expand Down Expand Up @@ -150,8 +151,8 @@ jobs:
$env:DEPLOY_BRANCH = $env:DEPLOY_BRANCH -creplace "BRANCH_NAME",$env:branch_name
$env:DEPLOY_BRANCH = $env:DEPLOY_BRANCH -creplace "OS","windows" -creplace "COMPILER",$env:vsversion
if ("${{ matrix.BuildType }}" -ne "BinDist")
{ $env:DEPLOY_BRANCH = -join($env:DEPLOY_BRANCH, "-", "${{ matrix.BuildType }}", "-CrashRpt") }
#if ("${{ matrix.BuildType }}" -ne "BinDist")
# { $env:DEPLOY_BRANCH = -join($env:DEPLOY_BRANCH, "-", "${{ matrix.BuildType }}", "-CrashRpt") }
cd ..
git clone https://$env:PUBLIC_REPO_TOKEN@github.com/$env:GITHUB_REPOSITORY-artifacts.git 2>&1>$null
Expand Down
2 changes: 1 addition & 1 deletion src/particle_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ bool MyEventHandler::load(const char *filename, const nc::EmscriptenLocalFile *l
clearData();

background_ = loaderState.background.color;
nc::theApplication().rootViewport().setClearColor(background_);
nc::theApplication().screenViewport().setClearColor(background_);

backgroundImageName_ = loaderState.background.imageName;
backgroundImagePosition_ = loaderState.background.imageNormalizedPosition * nc::Vector2f(nc::theApplication().width(), nc::theApplication().height());
Expand Down
2 changes: 1 addition & 1 deletion src/particle_editor_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void MyEventHandler::createGuiBackground()
if (ImGui::CollapsingHeader(widgetName_.data()))
{
ImGui::ColorEdit4("Color", background_.data(), ImGuiColorEditFlags_NoAlpha);
nc::theApplication().rootViewport().setClearColor(background_);
nc::theApplication().screenViewport().setClearColor(background_);

ImGui::Separator();
ImGui::InputText("Image to load", backgroundImageName_.data(), MaxStringLength,
Expand Down

0 comments on commit b7a80b8

Please sign in to comment.