Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/CI-using-CKAN' into DieAvionicsDie!
Browse files Browse the repository at this point in the history
  • Loading branch information
siimav committed Jul 18, 2024
2 parents 5427f55 + e86e07a commit e8bd5b5
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 72 deletions.
40 changes: 28 additions & 12 deletions .github/workflows/attachReleaseArtifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
release:
types: [published]

env:
KSP_ROOT: /tmp/ksp

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
attach-release-artifacts:
Expand All @@ -28,9 +31,22 @@ jobs:

- name: Download required assemblies
id: download-assemblies
uses: KSP-RO/BuildTools/download-assemblies@master
uses: KSP-RO/BuildTools/download-assemblies-v2@master
with:
KSP_ZIP_PASSWORD: ${{ secrets.KSP_ZIP_PASSWORD }}
dependency-identifiers: |
Harmony2
ClickThroughBlocker
ContractConfigurator
FerramAerospaceResearchContinued
Kerbalism
KSPCommunityFixes
ModularFlightIntegrator
RealAntennas
RealFuels
ROUtils
SolverEngines
ToolbarController
# Install .NET SDKs
- name: Setup .NET Core 3.1
Expand All @@ -45,35 +61,35 @@ jobs:
- name: Update AssemblyInfo
uses: KSP-RO/BuildTools/update-assembly-info@master
with:
path: ${GITHUB_WORKSPACE}/Source/RP0/Properties/AssemblyInfo.cs
path: ${{ github.workspace }}/Source/RP0/Properties/AssemblyInfo.cs
tag: ${{ github.event.release.tag_name }}

- name: Build mod solution
run: msbuild ${GITHUB_WORKSPACE}/Source/RP0.sln /t:build /restore /p:RestorePackagesConfig=true /p:Configuration=Release /p:ReferencePath="${{ steps.download-assemblies.outputs.ksp-dll-path }}"
run: msbuild ${{ github.workspace }}/Source/RP0.sln /t:build /restore /p:RestorePackagesConfig=true /p:Configuration=Release /p:ReferencePath="${{ steps.download-assemblies.outputs.ksp-dll-path }}" /p:KSPRoot="${{ env.KSP_ROOT }}"

- name: Remove excess DLLs
uses: KSP-RO/BuildTools/remove-excess-dlls@master
with:
path: ${GITHUB_WORKSPACE}/GameData/
path: ${{ github.workspace }}/GameData/

- name: Update version file
uses: KSP-RO/BuildTools/update-version-file@master
with:
tag: ${{ github.event.release.tag_name }}
path: ${GITHUB_WORKSPACE}/GameData/RP-1/RP-1.version
path: ${{ github.workspace }}/GameData/RP-1/RP-1.version

- name: Update Readme
uses: KSP-RO/BuildTools/update-version-in-readme@master
with:
path: ${GITHUB_WORKSPACE}/README.md
path: ${{ github.workspace }}/README.md
tag: ${{ github.event.release.tag_name }}

- name: Update changelog file
uses: KSP-RO/BuildTools/process-changelog@master
with:
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
path: ${GITHUB_WORKSPACE}/GameData/RP-1/changelog.cfg
path: ${{ github.workspace }}/GameData/RP-1/changelog.cfg

- name: Assemble release
id: assemble-release
Expand All @@ -83,8 +99,8 @@ jobs:
echo "Release zip: ${RELEASE_DIR}/RP-1-${{ github.event.release.tag_name }}.zip"
mkdir -v "${RELEASE_DIR}"
echo "::set-output name=release-dir::${RELEASE_DIR}"
cp -v -R "${GITHUB_WORKSPACE}/GameData" "${RELEASE_DIR}"
cp -v -R "${GITHUB_WORKSPACE}/LICENSE.md" "${RELEASE_DIR}/GameData/RP-1/LICENSE.md"
cp -v -R "${{ github.workspace }}/GameData" "${RELEASE_DIR}"
cp -v -R "${{ github.workspace }}/LICENSE.md" "${RELEASE_DIR}/GameData/RP-1/LICENSE.md"
cd ${RELEASE_DIR}
zip -r RP-1-${{ github.event.release.tag_name }}.zip GameData
Expand All @@ -109,9 +125,9 @@ jobs:
TAG_STRING: ${{ github.event.release.tag_name }}
run: |
RELEASEBRANCH=${{ env.tagged_branch }}
git add "${GITHUB_WORKSPACE}/GameData/RP-1/RP-1.version"
git add "${GITHUB_WORKSPACE}/README.md"
git add "${GITHUB_WORKSPACE}/GameData/RP-1/changelog.cfg"
git add "${{ github.workspace }}/GameData/RP-1/RP-1.version"
git add "${{ github.workspace }}/README.md"
git add "${{ github.workspace }}/GameData/RP-1/changelog.cfg"
git commit -m "Update version to $TAG_STRING"
git push origin $RELEASEBRANCH
git tag $TAG_STRING $RELEASEBRANCH --force
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
KSP_ROOT: /tmp/ksp

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check-secret:
Expand All @@ -38,9 +41,22 @@ jobs:

- name: Download required assemblies
id: download-assemblies
uses: KSP-RO/BuildTools/download-assemblies@master
uses: KSP-RO/BuildTools/download-assemblies-v2@master
with:
KSP_ZIP_PASSWORD: ${{ secrets.KSP_ZIP_PASSWORD }}
dependency-identifiers: |
Harmony2
ClickThroughBlocker
ContractConfigurator
FerramAerospaceResearchContinued
Kerbalism
KSPCommunityFixes
ModularFlightIntegrator
RealAntennas
RealFuels
ROUtils
SolverEngines
ToolbarController
- name: Get SHA
id: get-sha
Expand Down Expand Up @@ -70,22 +86,22 @@ jobs:
- name: Update AssemblyInfo
uses: KSP-RO/BuildTools/update-assembly-info@AssemblyInformationalVersion
with:
path: ${GITHUB_WORKSPACE}/Source/RP0/Properties/AssemblyInfo.cs
path: ${{ github.workspace }}/Source/RP0/Properties/AssemblyInfo.cs
tag: "3.0.0.0"
informational-version: ${{env.info_text}}

- name: Build mod solution
run: msbuild ${GITHUB_WORKSPACE}/Source/RP0.sln /t:build /restore /p:RestorePackagesConfig=true /p:Configuration=Release /p:ReferencePath="${{ steps.download-assemblies.outputs.ksp-dll-path }}"
run: msbuild ${{ github.workspace }}/Source/RP0.sln /t:build /restore /p:RestorePackagesConfig=true /p:Configuration=Release /p:ReferencePath="${{ steps.download-assemblies.outputs.ksp-dll-path }}" /p:KSPRoot="${{ env.KSP_ROOT }}"

- name: Remove excess DLLs
uses: KSP-RO/BuildTools/remove-excess-dlls@master
with:
path: ${GITHUB_WORKSPACE}/GameData/
path: ${{ github.workspace }}/GameData/

- name: Build metadata
uses: KSP-RO/BuildTools/update-version-file@master
with:
path: ${GITHUB_WORKSPACE}/GameData/RP-1/RP-1.version
path: ${{ github.workspace }}/GameData/RP-1/RP-1.version
tag: "v3.0.0.0"

- name: Assemble release
Expand All @@ -95,8 +111,8 @@ jobs:
echo "Release dir: ${RELEASE_DIR}"
mkdir -v "${RELEASE_DIR}"
echo "::set-output name=release-dir::${RELEASE_DIR}"
cp -v -R "${GITHUB_WORKSPACE}/GameData" "${RELEASE_DIR}"
cp -v -R "${GITHUB_WORKSPACE}/LICENSE.md" "${RELEASE_DIR}/GameData/RP-1/LICENSE.md"
cp -v -R "${{ github.workspace }}/GameData" "${RELEASE_DIR}"
cp -v -R "${{ github.workspace }}/LICENSE.md" "${RELEASE_DIR}/GameData/RP-1/LICENSE.md"
- name: Upload artifacts
uses: actions/upload-artifact@v1
Expand Down
23 changes: 16 additions & 7 deletions Source/CC_RP0/CC_RP0.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,33 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<KSPRoot Condition=" '$(KSPRoot)' == '' ">
$(ReferencePath.TrimEnd([System.IO.Path]::DirectorySeparatorChar))</KSPRoot>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/Assembly-CSharp.dll">
<HintPath>$(ReferencePath)/Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/Assembly-CSharp-firstpass.dll">
<HintPath>$(ReferencePath)/Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ContractConfigurator">
<Reference Include="$(KSPRoot)/GameData/ContractConfigurator/ContractConfigurator.dll">
<HintPath>$(ReferencePath)/ContractConfigurator.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System">
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/System.dll">
<HintPath>$(ReferencePath)/System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/UnityEngine.dll">
<HintPath>$(ReferencePath)/UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/UnityEngine.CoreModule.dll">
<HintPath>$(ReferencePath)/UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
Expand Down
24 changes: 16 additions & 8 deletions Source/ClearInputLocks/ClearInputLocks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,33 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<KSPRoot Condition=" '$(KSPRoot)' == '' ">
$(ReferencePath.TrimEnd([System.IO.Path]::DirectorySeparatorChar))</KSPRoot>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/Assembly-CSharp.dll">
<HintPath>$(ReferencePath)/Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/Assembly-CSharp-firstpass.dll">
<HintPath>$(ReferencePath)/Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System">
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/System.dll">
<HintPath>$(ReferencePath)/System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/UnityEngine.dll">
<HintPath>$(ReferencePath)/UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/UnityEngine.CoreModule.dll">
<HintPath>$(ReferencePath)/UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/UnityEngine.InputLegacyModule.dll">
<HintPath>$(ReferencePath)/UnityEngine.InputLegacyModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
Expand Down
15 changes: 12 additions & 3 deletions Source/InstallChecker/RP0InstallChecker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,21 @@
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
<KSPRoot Condition=" '$(KSPRoot)' == '' ">
$(ReferencePath.TrimEnd([System.IO.Path]::DirectorySeparatorChar))</KSPRoot>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/Assembly-CSharp.dll">
<HintPath>$(ReferencePath)/Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/System.dll">
<HintPath>$(ReferencePath)/System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="UnityEngine.CoreModule">
<Reference Include="$(KSPRoot)/KSP_x64_Data/Managed/UnityEngine.CoreModule.dll">
<HintPath>$(ReferencePath)/UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
Expand Down
Loading

0 comments on commit e8bd5b5

Please sign in to comment.