diff --git a/.github/actions/setup-unity/action.yml b/.github/actions/setup-unity/action.yml new file mode 100644 index 0000000..620e1bd --- /dev/null +++ b/.github/actions/setup-unity/action.yml @@ -0,0 +1,29 @@ +name: Setup Unity +description: Installs the Unity Editor + +inputs: + editor-version: + description: > + CKAN tag to install. set to an empty string to always install the most recent version. + See https://github.com/KSP-CKAN/CKAN/tags for a list of available tags + default: '' + +runs: + using: composite + steps: + - name: Install Unity public key + shell: bash + run: >- + wget -qO - https://hub.unity3d.com/linux/keys/public + | gpg --dearmor + | sudo tee /usr/share/keyrings/Unity_Technologies_ApS.gpg > /dev/null + + - name: Install Unity apt package + shell: bash + run: >- + sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg] https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list' + + - name: Install Unity hub + uses: tecolicom/actions-use-apt-tools@v1 + with: + tools: 'unityhub' \ No newline at end of file diff --git a/.github/workflows/internal-ci.yml b/.github/workflows/internal-ci.yml index 8da1c19..4def706 100644 --- a/.github/workflows/internal-ci.yml +++ b/.github/workflows/internal-ci.yml @@ -25,6 +25,9 @@ jobs: test-plugin-legacy: uses: './.github/workflows/internal-test-plugin-legacy.yml' + test-assetbundle: + uses: './.github/workflows/internal-test-assetbundle.yml' + build: env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 @@ -54,7 +57,7 @@ jobs: deploy-nuget: runs-on: ubuntu-latest - needs: [ test-plugin, test-plugin-nuget, test-plugin-legacy ] + needs: [ test-plugin, test-plugin-nuget, test-plugin-legacy, test-assetbundle ] environment: name: "NuGet" url: "https://www.nuget.org/packages/KSPBuildTools" diff --git a/.github/workflows/internal-test-assetbundle.yml b/.github/workflows/internal-test-assetbundle.yml new file mode 100644 index 0000000..ba217b9 --- /dev/null +++ b/.github/workflows/internal-test-assetbundle.yml @@ -0,0 +1,22 @@ +# This is an internal test for KSPBuildTools and not intended to be used by other projects +name: Test Assetbundle + +on: + workflow_call: + +env: + TESTDIR: tests/plugin-mod + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: ./.github/actions/setup-ckan + + - uses: ./.github/actions/compile + with: + ksp-zip-url: https://github.com/KSPModdingLibs/KSPLibs/raw/main/KSP-1.12.5.zip + working-directory: ${{ env.TESTDIR }} + solution-file-path: plugin-mod.csproj \ No newline at end of file