Skip to content

Commit

Permalink
fix: remove the pain :(
Browse files Browse the repository at this point in the history
  • Loading branch information
QuakeEye committed Feb 27, 2024
1 parent f9ccf1d commit 1f1fd74
Showing 1 changed file with 73 additions and 67 deletions.
140 changes: 73 additions & 67 deletions .github/workflows/test-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,90 +67,96 @@ jobs:



- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: '16'

- name: Install node package, `unity-license-activate`
run: npm install --global unity-license-activate
# Use dlls in this path to use for sonar:
# ./Unity/Hub/Editor/2022.3.19f1/Editor/Data/Managed

- name: Retrieve Activation File
id: retrieve-activation
run: |
chmod +x ./workflow-scripts/test-build/retrieve-activation-file.sh
./workflow-scripts/test-build/retrieve-activation-file.sh
env:
UNITY_USERNAME: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_VERSION: ${{ matrix.unity-version }}
UNITY_PATH: ${{ env.UNITY_PATH }}

- name: Activate the license
id: activate-license
continue-on-error: true
run: unity-license-activate ${{ secrets.UNITY_EMAIL }} ${{ secrets.UNITY_PASSWORD }} "./Unity_v2022.3.19f1.alf"

- name: Upload error screenshot
uses: actions/upload-artifact@v1
with:
name: screenshot_error
path: error.png


- name: Print Files
run: |
ls -R
# - name: Set up Node.js
# uses: actions/setup-node@v1
# with:
# node-version: '16'

- name: Read ulf
id: ulfRead
uses: juliangruber/[email protected]
with:
path: ./Unity_v2022.3.19f1.ulf
# path: ${{ steps.activate-license.outputs.license-path }}
# - name: Install node package, `unity-license-activate`
# run: npm install --global unity-license-activate

# - name: Update secret UNITY_LICENSE
# uses: hmanzur/[email protected]
# - name: Retrieve Activation File
# id: retrieve-activation
# run: |
# chmod +x ./workflow-scripts/test-build/retrieve-activation-file.sh
# ./workflow-scripts/test-build/retrieve-activation-file.sh
# env:
# UNITY_USERNAME: ${{ secrets.UNITY_EMAIL }}
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# UNITY_VERSION: ${{ matrix.unity-version }}
# UNITY_PATH: ${{ env.UNITY_PATH }}

# - name: Activate the license
# id: activate-license
# continue-on-error: true
# run: unity-license-activate ${{ secrets.UNITY_EMAIL }} ${{ secrets.UNITY_PASSWORD }} "./Unity_v2022.3.19f1.alf"

# - name: Upload error screenshot
# uses: actions/upload-artifact@v1
# with:
# name: 'UNITY_LICENSE'
# value: '${{ steps.ulfRead.outputs.content }}'
# token: ${{ secrets.ACCESS_TOKEN }}
# name: screenshot_error
# path: error.png


# - name: Print Files
# run: |
# ls -R


- name: Generate .sln and .csproj files
run: |
xvfb-run --auto-servernum $(pwd)/Unity/Hub/Editor/2022.3.19f1/Editor/Unity -batchmode -nographics -quit -logFile "-" -customBuildName aplib.net-demo -projectPath ./aplib.net-demo -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution
# - name: Read ulf
# id: ulfRead
# uses: juliangruber/[email protected]
# with:
# path: ./Unity_v2022.3.19f1.ulf
# # path: ${{ steps.activate-license.outputs.license-path }}

# # - name: Update secret UNITY_LICENSE
# # uses: hmanzur/[email protected]
# # with:
# # name: 'UNITY_LICENSE'
# # value: '${{ steps.ulfRead.outputs.content }}'
# # token: ${{ secrets.ACCESS_TOKEN }}



# - name: Install Dependencies
# run: |
# sudo apt-get -y install libfuse2
# sudo apt-get install at-spi2-core
# - name: Setup Unity for SonarQube
# id: setup-unity
# uses: kuler90/setup-unity@v1
# with:
# project-path: aplib.net-demo/
# install-path: unity-editors/${{ runner.os }}-unity-${{ matrix.unity-version }}
# if: steps.cache-unity.outputs.cache-hit != 'true'
# - name: Find Cache Entry

# - name: Generate .sln and .csproj files
# run: |
# ls -R
# echo $(pwd)
# xvfb-run --auto-servernum $(pwd)/Unity/Hub/Editor/2022.3.19f1/Editor/Unity -batchmode -nographics -quit -logFile "-" -customBuildName aplib.net-demo -projectPath ./aplib.net-demo -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution


- name: SonarQube Analysis
env:
FrameworkPathOverride: ${{ steps.setup-unity.outputs.unity-path }}/../Data/MonoBleedingEdge/
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
chmod +x ./workflow-scripts/test-build/sonarqube-analysis.sh
./workflow-scripts/test-build/sonarqube-analysis.sh


# # - name: Install Dependencies
# # run: |
# # sudo apt-get -y install libfuse2
# # sudo apt-get install at-spi2-core
# # - name: Setup Unity for SonarQube
# # id: setup-unity
# # uses: kuler90/setup-unity@v1
# # with:
# # project-path: aplib.net-demo/
# # install-path: unity-editors/${{ runner.os }}-unity-${{ matrix.unity-version }}
# # if: steps.cache-unity.outputs.cache-hit != 'true'
# # - name: Find Cache Entry
# # run: |
# # ls -R
# # echo $(pwd)


# - name: SonarQube Analysis
# env:
# FrameworkPathOverride: ${{ steps.setup-unity.outputs.unity-path }}/../Data/MonoBleedingEdge/
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# chmod +x ./workflow-scripts/test-build/sonarqube-analysis.sh
# ./workflow-scripts/test-build/sonarqube-analysis.sh
# - name: Install SonarCloud scanner
# if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
# shell: powershell
Expand Down

0 comments on commit 1f1fd74

Please sign in to comment.