Skip to content

Commit

Permalink
Update Windows to 2022 and enable Android Windows Images (#231)
Browse files Browse the repository at this point in the history
- Update windows images to 2022 from 2019. We need to do this because 2019 will go EOL in January which means Github will start failing builds using it and ultimately remove it within a few months after EOL based on how they operated with Server 2016. This means people will need to upgrade their workflows to use windows-2022 instead of windows-2019 and update any self hosted runners to support server-2022 containers (either use Windows Server 2022 or Windows 11 as their host)
- Setup Android dependencies to allow for Android builds on Windows. This enables using Burst on Android builds which is a major performance booster.
- Update several action workflow versions to fix dependabot warnings
- Setup better test exclusion patterns for Windows
- Move Unity install path to C:/UnityEditor. This fixes old versions of sdkmanager that don't handle spaces in the path. Using the UNITY_PATH environment variable will mitigate any changes like this in the future in downstream scripts.
  • Loading branch information
AndrewKahr authored Nov 1, 2023
1 parent 9962a6a commit 8722a6d
Show file tree
Hide file tree
Showing 18 changed files with 286 additions and 141 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Docs 📚

on:
push: { branches: [ main ] }
push: { branches: [main] }

jobs:
updateDescriptions:
Expand All @@ -16,7 +16,7 @@ jobs:
- editor
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
# Caveat - Currently we use the ubuntu readme as we do not have a catch-all readme (yet?)
- run: |
echo "SHORT_DESCRIPTION=$(cat ./images/ubuntu/${{ matrix.imageType }}/100-characters-dockerhub-description.txt)" >> $GITHUB_ENV
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/new-ubuntu-base-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout latest release tag
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $LATEST_TAG
#################
# Variables #
#################
Expand All @@ -50,11 +50,11 @@ jobs:
# Setup #
#############
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -81,7 +81,7 @@ jobs:
# Base image #
##################
- name: Build and publish
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
id: build_ubuntu_base_image
with:
file: ./images/ubuntu/base/Dockerfile
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/new-ubuntu-hub-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout latest release tag
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $LATEST_TAG
#################
# Variables #
#################
Expand All @@ -50,11 +50,11 @@ jobs:
# Setup #
#############
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
# Hub image #
#################
- name: Build and publish
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
id: build_ubuntu_hub_image
with:
file: ./images/ubuntu/hub/Dockerfile
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/new-ubuntu-legacy-editor-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
- webgl
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout latest release tag
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $LATEST_TAG
#################
# Variables #
#################
Expand Down Expand Up @@ -64,11 +64,11 @@ jobs:
# Setup #
#############
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
# Ubuntu Editor image #
###########################
- name: Build and publish
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
id: build_ubuntu_editor_image
continue-on-error: true
with:
Expand All @@ -126,7 +126,7 @@ jobs:
# Retry the above #
#######################
- name: Build and publish (retry)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
if: steps.build_ubuntu_editor_image.outcome=='failure'
id: build_ubuntu_editor_image_retry
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
- webgl
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout latest release tag
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $LATEST_TAG
#################
# Variables #
#################
Expand Down Expand Up @@ -64,11 +64,11 @@ jobs:
# Setup #
#############
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
# Ubuntu Editor image #
###########################
- name: Build and publish
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
id: build_ubuntu_editor_image
continue-on-error: true
with:
Expand All @@ -126,7 +126,7 @@ jobs:
# Retry the above #
#######################
- name: Build and publish (retry)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
if: steps.build_ubuntu_editor_image.outcome=='failure'
id: build_ubuntu_editor_image_retry
with:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/new-windows-base-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ on:
workflow_dispatch:
inputs:
jobId:
description: 'Job ID'
description: "Job ID"
required: true
default: 'dryRun'
default: "dryRun"
repoVersionFull:
description: 'All digits of the latest tag of this repository, e.g. `1.23.45`'
description: "All digits of the latest tag of this repository, e.g. `1.23.45`"
required: true
repoVersionMinor:
description: 'Minor digit of that tag, e.g. `23`'
description: "Minor digit of that tag, e.g. `23`"
required: true
repoVersionMajor:
description: 'Major digit of that tag, e.g. `1`'
description: "Major digit of that tag, e.g. `1`"
required: true

# Further reading:
Expand All @@ -29,10 +29,10 @@ on:
jobs:
build:
name: "🛠 Build unityci/base"
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/new-windows-hub-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ on:
workflow_dispatch:
inputs:
jobId:
description: 'Job ID'
description: "Job ID"
required: true
default: 'dryRun'
default: "dryRun"
repoVersionFull:
description: 'All digits of the latest tag of this repository, e.g. `1.23.45`'
description: "All digits of the latest tag of this repository, e.g. `1.23.45`"
required: true
repoVersionMinor:
description: 'Minor digit of that tag, e.g. `23`'
description: "Minor digit of that tag, e.g. `23`"
required: true
repoVersionMajor:
description: 'Major digit of that tag, e.g. `1`'
description: "Major digit of that tag, e.g. `1`"
required: true

# Further reading:
Expand All @@ -29,10 +29,10 @@ on:
jobs:
build:
name: "🛠 Build unityci/hub"
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -112,7 +112,6 @@ jobs:
# TODO: Cache layers, currently not supported on windows


############################
# Pull previous images #
############################
Expand Down
27 changes: 12 additions & 15 deletions .github/workflows/new-windows-legacy-editor-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ on:
workflow_dispatch:
inputs:
jobId:
description: 'Job ID'
description: "Job ID"
required: true
default: 'dryRun'
default: "dryRun"
editorVersion:
description: 'Unity Editor Version'
description: "Unity Editor Version"
required: true
default: '2020.3.24f1'
default: "2020.3.24f1"
changeSet:
description: 'Unity Editor Changeset'
description: "Unity Editor Changeset"
required: true
default: '79c78de19888'
default: "79c78de19888"
repoVersionFull:
description: 'All digits of the latest tag of this repository, e.g. `1.23.45`'
description: "All digits of the latest tag of this repository, e.g. `1.23.45`"
required: true
repoVersionMinor:
description: 'Minor digit of that tag, e.g. `23`'
description: "Minor digit of that tag, e.g. `23`"
required: true
repoVersionMajor:
description: 'Major digit of that tag, e.g. `1`'
description: "Major digit of that tag, e.g. `1`"
required: true

# Further reading:
Expand All @@ -33,19 +33,16 @@ on:
jobs:
buildImage:
name: "🛠 Build unityci/editor (${{ matrix.targetPlatform }})"
runs-on: windows-2019
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
targetPlatform:
- base
# - windows-il2cpp
# - universal-windows-platform
# - appletv

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -54,7 +51,7 @@ jobs:
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $LATEST_TAG
shell: bash

#################
# Variables #
#################
Expand Down
Loading

0 comments on commit 8722a6d

Please sign in to comment.