Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecations and errors #198

Merged
merged 6 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/actions/report-to-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ inputs:
required: false

runs:
using: 'node12'
using: 'node16'
main: 'index.js'
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ jobs:
- name: Image digest
id: image-digest
run: |
[ '${{ steps.build_ubuntu_editor_image.outcome }}' = 'success' ] && echo "::set-output name=digest::${{ steps.build_ubuntu_editor_image.outputs.digest }}" || :
[ '${{ steps.build_ubuntu_editor_image_retry.outcome }}' = 'success' ] && echo "::set-output name=digest::${{ steps.build_ubuntu_editor_image_retry.outputs.digest }}" || :
[ '${{ steps.build_ubuntu_editor_image.outcome }}' = 'success' ] && echo "digest=${{ steps.build_ubuntu_editor_image.outputs.digest }}" >> $GITHUB_OUTPUT || :
[ '${{ steps.build_ubuntu_editor_image_retry.outcome }}' = 'success' ] && echo "digest=${{ steps.build_ubuntu_editor_image_retry.outputs.digest }}" >> $GITHUB_OUTPUT || :
#################
# reporting #
#################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ jobs:
- name: Image digest
id: image-digest
run: |
[ '${{ steps.build_ubuntu_editor_image.outcome }}' = 'success' ] && echo "::set-output name=digest::${{ steps.build_ubuntu_editor_image.outputs.digest }}" || :
[ '${{ steps.build_ubuntu_editor_image_retry.outcome }}' = 'success' ] && echo "::set-output name=digest::${{ steps.build_ubuntu_editor_image_retry.outputs.digest }}" || :
[ '${{ steps.build_ubuntu_editor_image.outcome }}' = 'success' ] && echo "digest=${{ steps.build_ubuntu_editor_image.outputs.digest }}" >> $GITHUB_OUTPUT || :
[ '${{ steps.build_ubuntu_editor_image_retry.outcome }}' = 'success' ] && echo "digest=${{ steps.build_ubuntu_editor_image_retry.outputs.digest }}" >> $GITHUB_OUTPUT || :
#################
# reporting #
#################
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/new-windows-base-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ jobs:
if ("${{ github.event.inputs.jobId }}")
{
# Workflow Dispatch
echo '::set-output name=jobId::${{ github.event.inputs.jobId }}'
echo '::set-output name=repoVersionFull::${{ github.event.inputs.repoVersionFull }}'
echo '::set-output name=repoVersionMinor::${{ github.event.inputs.repoVersionMinor }}'
echo '::set-output name=repoVersionMajor::${{ github.event.inputs.repoVersionMajor }}'
echo "jobId=${{ github.event.inputs.jobId }}" >> $GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.inputs.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.inputs.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.inputs.repoVersionMajor }}" >> $GITHUB_OUTPUT
} else
{
# Repo Dispatch
echo '::set-output name=jobId::${{ github.event.client_payload.jobId }}'
echo '::set-output name=repoVersionFull::${{ github.event.client_payload.repoVersionFull }}'
echo '::set-output name=repoVersionMinor::${{ github.event.client_payload.repoVersionMinor }}'
echo '::set-output name=repoVersionMajor::${{ github.event.client_payload.repoVersionMajor }}'
echo "jobId=${{ github.event.client_payload.jobId }}" >> $GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $GITHUB_OUTPUT
}

- name: Show hook input
Expand Down Expand Up @@ -124,8 +124,8 @@ jobs:
$MetaData = docker inspect unityci/base:windows-${{ steps.buildParameters.outputs.repoVersionFull }}
$ImageDetails = $MetaData | ConvertFrom-Json
$Digest = $ImageDetails.Config.Image
echo "::set-output name=digest::$Digest"
echo "::set-output name=metadata::$MetaData"
echo "digest=$Digest" >> $GITHUB_OUTPUT
echo "metadata=$MetaData" >> $GITHUB_OUTPUT

- name: Inspect
run: |
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/new-windows-hub-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ jobs:
if ("${{ github.event.inputs.jobId }}")
{
# Workflow Dispatch
echo '::set-output name=jobId::${{ github.event.inputs.jobId }}'
echo '::set-output name=repoVersionFull::${{ github.event.inputs.repoVersionFull }}'
echo '::set-output name=repoVersionMinor::${{ github.event.inputs.repoVersionMinor }}'
echo '::set-output name=repoVersionMajor::${{ github.event.inputs.repoVersionMajor }}'
echo "jobId={{ github.event.inputs.jobId }}" >> $GITHUB_OUTPUT
echo "repoVersionFull={{ github.event.inputs.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor={{ github.event.inputs.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor={{ github.event.inputs.repoVersionMajor }}" >> $GITHUB_OUTPUT
} else
{
# Repo Dispatch
echo '::set-output name=jobId::${{ github.event.client_payload.jobId }}'
echo '::set-output name=repoVersionFull::${{ github.event.client_payload.repoVersionFull }}'
echo '::set-output name=repoVersionMinor::${{ github.event.client_payload.repoVersionMinor }}'
echo '::set-output name=repoVersionMajor::${{ github.event.client_payload.repoVersionMajor }}'
echo "jobId=${{ github.event.client_payload.jobId }}" >> $GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $GITHUB_OUTPUT
}

- name: Show hook input
Expand Down Expand Up @@ -131,8 +131,8 @@ jobs:
$MetaData = docker inspect unityci/hub:windows-${{ steps.buildParameters.outputs.repoVersionFull }}
$ImageDetails = $MetaData | ConvertFrom-Json
$Digest = $ImageDetails.Config.Image
echo "::set-output name=digest::$Digest"
echo "::set-output name=metadata::$MetaData"
echo "digest=$Digest" >> $GITHUB_OUTPUT
echo "metadata=$MetaData" >> $GITHUB_OUTPUT

- name: Inspect
run: |
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/new-windows-legacy-editor-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@ jobs:
if ("${{ github.event.inputs.jobId }}")
{
# Workflow Dispatch
echo '::set-output name=jobId::${{ github.event.inputs.jobId }}'
echo '::set-output name=editorVersion::${{ github.event.inputs.editorVersion }}'
echo '::set-output name=changeSet::${{ github.event.inputs.changeSet }}'
echo '::set-output name=repoVersionFull::${{ github.event.inputs.repoVersionFull }}'
echo '::set-output name=repoVersionMinor::${{ github.event.inputs.repoVersionMinor }}'
echo '::set-output name=repoVersionMajor::${{ github.event.inputs.repoVersionMajor }}'
echo "jobId=${{ github.event.inputs.jobId }}" >> $GITHUB_ENV
echo "editorVersion=${{ github.event.inputs.editorVersion }}" >> $GITHUB_ENV
echo "changeSet=${{ github.event.inputs.changeSet }}" >> $GITHUB_ENV
echo "repoVersionFull=${{ github.event.inputs.repoVersionFull }}" >> $GITHUB_ENV
echo "repoVersionMinor=${{ github.event.inputs.repoVersionMinor }}" >> $GITHUB_ENV
echo "repoVersionMajor=${{ github.event.inputs.repoVersionMajor }}" >> $GITHUB_ENV
} else
{
# Repo Dispatch
echo '::set-output name=jobId::${{ github.event.client_payload.jobId }}'
echo '::set-output name=editorVersion::${{ github.event.client_payload.editorVersion }}'
echo '::set-output name=changeSet::${{ github.event.client_payload.changeSet }}'
echo '::set-output name=repoVersionFull::${{ github.event.client_payload.repoVersionFull }}'
echo '::set-output name=repoVersionMinor::${{ github.event.client_payload.repoVersionMinor }}'
echo '::set-output name=repoVersionMajor::${{ github.event.client_payload.repoVersionMajor }}'
echo "jobId=${{ github.event.client_payload.jobId }}" >> $GITHUB_ENV
echo "editorVersion=${{ github.event.client_payload.editorVersion }}" >> $GITHUB_ENV
echo "changeSet=${{ github.event.client_payload.changeSet }}" >> $GITHUB_ENV
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $GITHUB_ENV
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $GITHUB_ENV
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $GITHUB_ENV
}

- name: Show hook input
Expand Down Expand Up @@ -203,8 +203,8 @@ jobs:
$MetaData = docker inspect unityci/editor:windows-${{ steps.buildParameters.outputs.editorVersion }}-${{ matrix.targetPlatform }}-${{ steps.buildParameters.outputs.repoVersionFull }}
$ImageDetails = $MetaData | ConvertFrom-Json
$Digest = $ImageDetails.Config.Image
echo "::set-output name=digest::$Digest"
echo "::set-output name=metadata::$MetaData"
echo "digest=$Digest" >> $GITHUB_OUTPUT
echo "metadata=$MetaData" >> $GITHUB_OUTPUT

#################
# reporting #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@ jobs:
if ("${{ github.event.inputs.jobId }}")
{
# Workflow Dispatch
echo '::set-output name=jobId::${{ github.event.inputs.jobId }}'
echo '::set-output name=editorVersion::${{ github.event.inputs.editorVersion }}'
echo '::set-output name=changeSet::${{ github.event.inputs.changeSet }}'
echo '::set-output name=repoVersionFull::${{ github.event.inputs.repoVersionFull }}'
echo '::set-output name=repoVersionMinor::${{ github.event.inputs.repoVersionMinor }}'
echo '::set-output name=repoVersionMajor::${{ github.event.inputs.repoVersionMajor }}'
echo "jobId=${{ github.event.inputs.jobId }}" >> $GITHUB_ENV
echo "editorVersion=${{ github.event.inputs.editorVersion }}" >> $GITHUB_ENV
echo "changeSet=${{ github.event.inputs.changeSet }}" >> $GITHUB_ENV
echo "repoVersionFull=${{ github.event.inputs.repoVersionFull }}" >> $GITHUB_ENV
echo "repoVersionMinor=${{ github.event.inputs.repoVersionMinor }}" >> $GITHUB_ENV
echo "repoVersionMajor=${{ github.event.inputs.repoVersionMajor }}" >> $GITHUB_ENV
} else
{
# Repo Dispatch
echo '::set-output name=jobId::${{ github.event.client_payload.jobId }}'
echo '::set-output name=editorVersion::${{ github.event.client_payload.editorVersion }}'
echo '::set-output name=changeSet::${{ github.event.client_payload.changeSet }}'
echo '::set-output name=repoVersionFull::${{ github.event.client_payload.repoVersionFull }}'
echo '::set-output name=repoVersionMinor::${{ github.event.client_payload.repoVersionMinor }}'
echo '::set-output name=repoVersionMajor::${{ github.event.client_payload.repoVersionMajor }}'
echo "jobId=${{ github.event.client_payload.jobId }}" >> $GITHUB_ENV
echo "editorVersion=${{ github.event.client_payload.editorVersion }}" >> $GITHUB_ENV
echo "changeSet=${{ github.event.client_payload.changeSet }}" >> $GITHUB_ENV
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $GITHUB_ENV
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $GITHUB_ENV
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $GITHUB_ENV
}

- name: Show hook input
Expand Down Expand Up @@ -203,8 +203,8 @@ jobs:
$MetaData = docker inspect unityci/editor:windows-${{ steps.buildParameters.outputs.editorVersion }}-${{ matrix.targetPlatform }}-${{ steps.buildParameters.outputs.repoVersionFull }}
$ImageDetails = $MetaData | ConvertFrom-Json
$Digest = $ImageDetails.Config.Image
echo "::set-output name=digest::$Digest"
echo "::set-output name=metadata::$MetaData"
echo "digest=$Digest" >> $GITHUB_OUTPUT
echo "metadata=$MetaData" >> $GITHUB_OUTPUT

#################
# reporting #
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/retry-ubuntu-editor-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ jobs:
- name: Image digest
id: image-digest
run: |
[ '${{ steps.build_ubuntu_editor_image.outcome }}' = 'success' ] && echo "::set-output name=digest::${{ steps.build_ubuntu_editor_image.outputs.digest }}" || :
[ '${{ steps.build_ubuntu_editor_image_retry.outcome }}' = 'success' ] && echo "::set-output name=digest::${{ steps.build_ubuntu_editor_image_retry.outputs.digest }}" || :
[ '${{ steps.build_ubuntu_editor_image.outcome }}' = 'success' ] && echo "digest=${{ steps.build_ubuntu_editor_image.outputs.digest }}" >> $GITHUB_OUTPUT || :
[ '${{ steps.build_ubuntu_editor_image_retry.outcome }}' = 'success' ] && echo "digest=${{ steps.build_ubuntu_editor_image_retry.outputs.digest }}" >> $GITHUB_OUTPUT || :
#################
# reporting #
#################
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/retry-windows-editor-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ jobs:
$MetaData = docker inspect unityci/editor:windows-${{ github.event.client_payload.editorVersion }}-${{ github.event.client_payload.targetPlatform }}-${{ github.event.client_payload.repoVersionFull }}
$ImageDetails = $MetaData | ConvertFrom-Json
$Digest = $ImageDetails.Config.Image
echo "::set-output name=digest::$Digest"
echo "::set-output name=metadata::$MetaData"
echo "digest=$Digest" >> $GITHUB_OUTPUT
echo "metadata=$MetaData" >> $GITHUB_OUTPUT

#################
# reporting #
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
##########################
ubuntu-base-and-hub:
name: Base and hub
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.setup.outputs.versions }}
excludes: ${{ steps.setup.outputs.excludes }}
Expand Down Expand Up @@ -72,22 +72,22 @@ jobs:
# Get the Unity versions for test. (The latest patch versions for each minor version.)
VERSIONS=`npx unity-changeset list --versions --latest-patch --json --min 2018.3`
echo "Versions: $VERSIONS"
echo "::set-output name=versions::$VERSIONS"
echo "versions=$VERSIONS" >> $GITHUB_OUTPUT

# Exclude linux-il2cpp for Unity 2019.2 or earlier
EXCLUDES="$EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2018|2019.1|2019.2\")) | { version: ., module: \"linux-il2cpp\"} ]'`"

EXCLUDES=`echo "$EXCLUDES" | jq -s -c 'flatten'`
echo "Excludes: $EXCLUDES"
echo "::set-output name=excludes::$EXCLUDES"
echo "excludes=$EXCLUDES" >> $GITHUB_OUTPUT

#############################
# Build editor and test #
#############################
editor:
needs: ubuntu-base-and-hub
name: Editor (${{ matrix.version }}, ${{ matrix.module }})
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -208,6 +208,11 @@ jobs:
mv -f reference-project-test/ProjectSettings/ProjectSettings_il2cpp.asset reference-project-test/ProjectSettings/ProjectSettings.asset
fi

# For editors prior to 2020, use built-in packages. Otherwise use the packages.json with the necessary packages.
if [[ $(echo ${{ matrix.version }} | cut -d '.' -f1) -ge 2020 ]]; then
mv -f reference-project-test/Packages_Disabled reference-project-test/Packages
fi

#############
# Build #
#############
Expand Down
4 changes: 2 additions & 2 deletions images/windows/editor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ FROM $hubImage as Builder
# the installation. Otherwise docker believes there was an error
ARG version
ARG changeSet
RUN "C:/Program Files/Unity Hub/Unity Hub.exe" -- --headless install \
RUN "C:/Program Files/Unity Hub/Unity Hub.exe" --no-sandbox --headless install \
--version %version% \
--changeset %changeSet% \
& if %ERRORLEVEL% EQU 1 exit 0

ARG module
RUN IF NOT %module% == "base" ( \
"C:/Program Files/Unity Hub/Unity Hub.exe" -- --headless install-modules \
"C:/Program Files/Unity Hub/Unity Hub.exe" --no-sandbox --headless install-modules \
--version %version% \
--module %module% \
--childModules \
Expand Down
3 changes: 2 additions & 1 deletion images/windows/hub/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG baseImage="unityci/base:windows-latest"

FROM $baseImage
ARG hubVersion="3.0.0"

# Install unity hub
RUN choco install unity-hub --no-progress -y
RUN choco install unity-hub --version=%hubVersion --no-progress -y
5 changes: 5 additions & 0 deletions reference-project-test/Packages_Disabled/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"com.unity.test-framework": "1.0.0"
}
}