From 12a4d294805fdee43b2bb3ac1c1441eae92da999 Mon Sep 17 00:00:00 2001 From: alexander Date: Wed, 18 Sep 2024 11:53:15 +0300 Subject: [PATCH 01/18] ci: remove unused yaml scripts References: Eppie-io/Eppie-App#332 --- .github/actions/build-project/action.yml | 61 ---------- .github/actions/build-uno-project/action.yml | 112 ------------------ .github/actions/project-map/action.yml | 82 ------------- .github/actions/setup-uno-platform/action.yml | 74 ------------ .github/actions/uno-check-manifest/action.yml | 94 --------------- 5 files changed, 423 deletions(-) delete mode 100644 .github/actions/build-project/action.yml delete mode 100644 .github/actions/build-uno-project/action.yml delete mode 100644 .github/actions/project-map/action.yml delete mode 100644 .github/actions/setup-uno-platform/action.yml delete mode 100644 .github/actions/uno-check-manifest/action.yml diff --git a/.github/actions/build-project/action.yml b/.github/actions/build-project/action.yml deleted file mode 100644 index c57a6206..00000000 --- a/.github/actions/build-project/action.yml +++ /dev/null @@ -1,61 +0,0 @@ -############################################################################### -# -# Copyright 2023 Eppie(https://eppie.io) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -############################################################################### - -name: Build the project - -description: Run building the project - -inputs: - project-file: - description: The project or solution file to build - required: true - type: string - - project-configuration: - description: Defines the build configuration - required: false - type: string - default: Debug - - build-properties: - description: Set or override the specified project-level properties - required: false - type: string - default: '' - - builder-type: - description: Defines which builder is used to build the project - required: false - type: choice - default: msbuild - options: - - msbuild - - dotnet - -runs: - using: "composite" - steps: - - name: Build with msbuild - if: ${{ inputs.builder-type == 'msbuild' }} - run: msbuild ${{ inputs.project-file }} -nologo -restore -verbosity:minimal -consoleLoggerParameters:Summary -property:Configuration=${{ inputs.project-configuration }} ${{ inputs.build-properties }} - shell: pwsh - - - name: Build with dotnet - if: ${{ inputs.builder-type == 'dotnet' }} - run: dotnet build ${{ inputs.project-file }} --nologo --configuration ${{ inputs.project-configuration }} ${{ inputs.build-properties }} - shell: bash diff --git a/.github/actions/build-uno-project/action.yml b/.github/actions/build-uno-project/action.yml deleted file mode 100644 index 9c9cce3b..00000000 --- a/.github/actions/build-uno-project/action.yml +++ /dev/null @@ -1,112 +0,0 @@ -############################################################################### -# -# Copyright 2023 Eppie(https://eppie.io) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -############################################################################### - -name: Build the Uno project - -description: Runs building the Uno project on different platforms - -inputs: - project-map: - description: Json with project map - required: true - type: string - - configuration: - description: Defines the build configuration - required: false - type: string - default: Debug - - target: - description: Defines the build target platform - required: false - type: choice - default: default - options: - - default - - android - - gtk - - ios - - macos - - wasm - - win-x64 - - win-x86 - - win-arm64 - -runs: - using: "composite" - steps: - - name: Build with msbuild - id: build-initializer - shell: bash - run: | - case ${{ inputs.target }} in - android) - echo 'project-file=${{ fromJSON(inputs.project-map).android }}' >> $GITHUB_OUTPUT - echo 'build-properties=-property:TargetFramework=net7.0-android' >> $GITHUB_OUTPUT - echo 'builder-type=dotnet' >> $GITHUB_OUTPUT - ;; - gtk) - echo 'project-file=${{ fromJSON(inputs.project-map).gtk }}' >> $GITHUB_OUTPUT - echo 'build-properties=' >> $GITHUB_OUTPUT - echo 'builder-type=dotnet' >> $GITHUB_OUTPUT - ;; - ios) - echo 'project-file=${{ fromJSON(inputs.project-map).ios }}' >> $GITHUB_OUTPUT - echo 'build-properties=-property:TargetFramework=net7.0-ios' >> $GITHUB_OUTPUT - echo 'builder-type=dotnet' >> $GITHUB_OUTPUT - ;; - macos) - echo 'project-file=${{ fromJSON(inputs.project-map).macos }}' >> $GITHUB_OUTPUT - echo 'build-properties=-property:TargetFramework=net7.0-maccatalyst' >> $GITHUB_OUTPUT - echo 'builder-type=dotnet' >> $GITHUB_OUTPUT - ;; - wasm) - echo 'project-file=${{ fromJSON(inputs.project-map).wasm }}' >> $GITHUB_OUTPUT - echo 'build-properties=' >> $GITHUB_OUTPUT - echo 'builder-type=dotnet' >> $GITHUB_OUTPUT - ;; - win-x64) - echo 'project-file=${{ fromJSON(inputs.project-map).windows }}' >> $GITHUB_OUTPUT - echo 'build-properties=-property:Platform=x64' >> $GITHUB_OUTPUT - echo 'builder-type=msbuild' >> $GITHUB_OUTPUT - ;; - win-x86) - echo 'project-file=${{ fromJSON(inputs.project-map).windows }}' >> $GITHUB_OUTPUT - echo 'build-properties=-property:Platform=x86' >> $GITHUB_OUTPUT - echo 'builder-type=msbuild' >> $GITHUB_OUTPUT - ;; - win-arm64) - echo 'project-file=${{ fromJSON(inputs.project-map).windows }}' >> $GITHUB_OUTPUT - echo 'build-properties=-property:Platform=arm64' >> $GITHUB_OUTPUT - echo 'builder-type=msbuild' >> $GITHUB_OUTPUT - ;; - *) - echo 'project-file=${{ fromJSON(inputs.project-map).solution }}' >> $GITHUB_OUTPUT - echo 'build-properties=' >> $GITHUB_OUTPUT - echo 'builder-type=msbuild' >> $GITHUB_OUTPUT - ;; - esac - - - name: Build project - uses: ./.github/actions/build-project - with: - project-file: ${{ steps.build-initializer.outputs.project-file }} - project-configuration: ${{ inputs.configuration }} - build-properties: ${{ steps.build-initializer.outputs.build-properties }} - builder-type: ${{ steps.build-initializer.outputs.builder-type }} diff --git a/.github/actions/project-map/action.yml b/.github/actions/project-map/action.yml deleted file mode 100644 index 1f32d61b..00000000 --- a/.github/actions/project-map/action.yml +++ /dev/null @@ -1,82 +0,0 @@ -############################################################################### -# -# Copyright 2023 Eppie(https://eppie.io) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -############################################################################### - -name: Project file map - -description: Sets project file map - -inputs: - solution-file: - description: Solution file path - type: string - required: true - - android-project-file: - description: Android project file path - type: string - required: true - - gtk-project-file: - description: GTK project file path - type: string - required: true - - ios-project-file: - description: iOS project file path - type: string - required: true - - macos-project-file: - description: MacOS project file path - type: string - required: true - - wasm-project-file: - description: Wasm project file path - type: string - required: true - - windows-project-file: - description: Windows project file path - type: string - required: true -outputs: - map: - value: ${{ steps.init-projects.outputs.map }} -runs: - using: "composite" - - steps: - - id: init-projects - shell: bash - run: | - map=$(cat << EOF - { - "solution":"${{ inputs.solution-file }}", - "android":"${{ inputs.android-project-file }}", - "gtk":"${{ inputs.gtk-project-file }}", - "ios":"${{ inputs.ios-project-file }}", - "macos":"${{ inputs.macos-project-file }}", - "wasm":"${{ inputs.wasm-project-file }}", - "windows":"${{ inputs.windows-project-file }}", - } - EOF - ) - echo "map<> $GITHUB_OUTPUT - echo "$map" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT diff --git a/.github/actions/setup-uno-platform/action.yml b/.github/actions/setup-uno-platform/action.yml deleted file mode 100644 index 8305de32..00000000 --- a/.github/actions/setup-uno-platform/action.yml +++ /dev/null @@ -1,74 +0,0 @@ -############################################################################### -# -# Copyright 2023 Eppie(https://eppie.io) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -############################################################################### - -name: Setup the Uno Platform - -description: Sets up the Uno Platform and dependencies - -inputs: - uno-check-manifest-uri: - type: string - description: Alternative uno-check manifest file path or URL - required: false - - uno-check-version: - type: string - description: uno-check version - required: false - -runs: - using: "composite" - steps: - - id: uno-check-version-option - if: ${{ inputs.uno-check-version != null && inputs.uno-check-version != '' }} - run: echo 'cli-arg=--version ${{ inputs.uno-check-version }}' >> $GITHUB_OUTPUT - shell: bash - - - id: uno-check-manifest-option - if: ${{ inputs.uno-check-manifest-uri != null && inputs.uno-check-manifest-uri != '' }} - run: echo 'cli-arg=--manifest ${{ inputs.uno-check-manifest-uri }}' >> $GITHUB_OUTPUT - shell: bash - - - name: Update uno.check - run: dotnet tool update --global uno.check ${{ steps.uno-check-version-option.outputs.cli-arg }} --add-source https://api.nuget.org/v3/index.json - shell: bash - - - name: Download uno-check manifest - id: uno-check-manifest - uses: ./.github/actions/uno-check-manifest - with: - update-uno-check: false - uno-check-manifest-uri: ${{ inputs.uno-check-manifest-uri }} - - - name: Get .NET version (The Uno Platform requirement) - id: dotnet-uno-version - shell: bash - run: | - version="${{ fromJson(env.uno-check-manifest).check.variables.DOTNET_SDK_VERSION }}" - echo "version=$version" >> $GITHUB_OUTPUT - env: - uno-check-manifest: ${{ steps.uno-check-manifest.outputs.uno-check-manifest-json }} - - - name: Setup .NET (The Uno Platform requirement) - uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 - with: - dotnet-version: ${{ steps.dotnet-uno-version.outputs.version }} - - - name: Run uno.check - run: uno-check --verbose --ci --non-interactive --fix --target webassembly --target ios --target android --target macos --target linux --target win32 --skip xcode --skip vswin --skip vsmac --skip wsl --skip edgewebview2 --skip androidemulator ${{ steps.uno-check-manifest-option.outputs.cli-arg }} - shell: bash diff --git a/.github/actions/uno-check-manifest/action.yml b/.github/actions/uno-check-manifest/action.yml deleted file mode 100644 index cf10f840..00000000 --- a/.github/actions/uno-check-manifest/action.yml +++ /dev/null @@ -1,94 +0,0 @@ -############################################################################### -# -# Copyright 2023 Eppie(https://eppie.io) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -############################################################################### - -name: Download uno-check manifest - -description: Gets the contents of the uno-check manifest.json file - -inputs: - uno-check-manifest-uri: - type: string - description: Alternative uno-check manifest file path or URL - required: false - - update-uno-check: - type: boolean - description: update 'uno.check' dotnet tool - required: false - default: true - - uno-check-version: - type: string - description: uno-check version - required: false - -outputs: - uno-check-manifest-json: - value: ${{ steps.uno-check-manifest.outputs.manifest }} - -runs: - using: "composite" - steps: - - id: uno-check-version-option - if: ${{ inputs.update-uno-check && inputs.uno-check-version != null && inputs.uno-check-version != '' }} - shell: pwsh - run: | - "cli-arg=--version ${{ inputs.uno-check-version }}" | Write-Output >> $env:GITHUB_OUTPUT - - - name: Update uno.check - if: ${{ inputs.update-uno-check }} - shell: pwsh - run: $(dotnet tool update --global uno.check ${{ steps.uno-check-version-option.outputs.cli-arg }} --add-source https://api.nuget.org/v3/index.json) - - - name: Find uno-check manifest uri - id: uno-check-manifest-uri - shell: pwsh - run: | - $manifest_uri="${{ inputs.uno-check-manifest-uri }}" - - if ($manifest_uri) - { - "manifest-uri=$manifest_uri" | Write-Output >> $env:GITHUB_OUTPUT - } - else - { - $uno_check_output=$(uno-check --ci --non-interactive --verbose --skip all) || $("Execution of the 'uno-check' utility completed with error #$($LASTEXITCODE)." | Write-Output) - $regex="Loading Manifest from:\s*(\S+)" - - if ("$uno_check_output" -match $regex) - { - "manifest-uri=$($matches[1])" | Write-Output >> $env:GITHUB_OUTPUT - } - else - { - "manifest-uri=${{ env.main-manifest-uri }}" | Write-Output >> $env:GITHUB_OUTPUT - } - - $(exit 0) - } - env: - main-manifest-uri: https://raw.githubusercontent.com/unoplatform/uno.check/main/manifests/uno.ui.manifest.json - - - name: Download uno-check manifest - id: uno-check-manifest - shell: pwsh - run: | - $json = Invoke-WebRequest -uri '${{ env.uno-check-manifest-uri }}' | ConvertFrom-Json | ConvertTo-Json -Compress -Depth 10 - "manifest=$json" | Write-Output >> $env:GITHUB_OUTPUT - env: - uno-check-manifest-uri: ${{ steps.uno-check-manifest-uri.outputs.manifest-uri }} From 0e51cc2a4ef5a3c29e7a9291b35c9156d6769406 Mon Sep 17 00:00:00 2001 From: alexander Date: Wed, 18 Sep 2024 11:56:54 +0300 Subject: [PATCH 02/18] ci: build project References: Eppie-io/Eppie-App#332 --- .github/configurations/build.json | 48 ++++++++++++ .github/workflows/build.yml | 118 +++++++++++++++++------------- 2 files changed, 117 insertions(+), 49 deletions(-) create mode 100644 .github/configurations/build.json diff --git a/.github/configurations/build.json b/.github/configurations/build.json new file mode 100644 index 00000000..008ac48a --- /dev/null +++ b/.github/configurations/build.json @@ -0,0 +1,48 @@ +[ + { + "keywords": [ + "uno", + "all" + ], + "os": [ + "windwos-latest" + ], + "project":"./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "build": { + "tool": "msbuild", + "configuration": "release", + "extra": "-verbosity:detailed" + } + }, + { + "keywords": [ + "uno", + "all" + ], + "os": [ + "macos-latest", + "ubuntu-latest" + ], + "project":"./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "build": { + "tool": "dotnet", + "configuration": "release", + "extra": "--verbosity" + } + }, + { + "keywords": [ + "uwp", + "all" + ], + "os": [ + "windwos-latest" + ], + "project":"./source/Eppie.App/Eppie.App.UWP/Eppie.App.UWP.csproj", + "build": { + "tool": "msbuild", + "configuration": "release", + "extra": "-verbosity:detailed" + } + } +] \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3afec254..386ac9ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ ############################################################################### # -# Copyright 2023 Eppie(https://eppie.io) +# Copyright 2024 Eppie(https://eppie.io) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,24 +16,49 @@ # ############################################################################### +--- + name: "Build solution" -on: +on: # yamllint disable-line rule:truthy + workflow_dispatch: push: - branches: [ "main" ] + branches: + - main + - release/** pull_request: - branches: [ "main" ] - workflow_dispatch: + branches: + - main + - release/** jobs: + prepare: + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.build-config.outputs.matrix }} + + steps: + - name: Checkout + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + fetch-depth: 0 + + - name: config + id: build-config + uses: finebits/github-actions/toolset/select-configuration@8f808eb66ee57460326283fdeedde8c63986be00 # v1.6.0-prerelease + with: + json-file: ./.github/configuration/build.json + keywords: "all" + build: - runs-on: windows-latest + needs: prepare strategy: - matrix: - configuration: [ Debug, Release ] - target: [ android, gtk, ios, macos, wasm, win-x64, win-x86, win-arm64 ] + matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} + + runs-on: ${{ matrix.os }} env: configuration: ${{ matrix.configuration }} @@ -41,45 +66,40 @@ jobs: dotnet-version: '8.x' - name: Eppie.App - root-dirictory: src/Eppie.App + steps: + - name: Checkout + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + fetch-depth: 0 + submodules: recursive + + - name: Setup .NET + uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1 + with: + dotnet-version: ${{ env.dotnet-version }} - # template: root/name/name.target/name.target.csproj - project-file-template: '{0}/{1}.{2}/{1}.{2}.csproj' + - name: Setup msbuild + uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0 - steps: - - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - fetch-depth: 0 - submodules: recursive - - - name: Setup .NET - uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1 - with: - dotnet-version: ${{ env.dotnet-version }} - - - name: Setup msbuild - uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0 - - - name: Initialize project file paths - id: init-projects - uses: ./.github/actions/project-map - with: - solution-file: "${{ format('{0}/{1}.sln', env.root-dirictory, env.name) }}" - android-project-file: "${{ format(env.project-file-template, env.root-dirictory, env.name, 'Mobile') }}" - gtk-project-file: "${{ format(env.project-file-template, env.root-dirictory, env.name, 'Skia.Gtk') }}" - ios-project-file: "${{ format(env.project-file-template, env.root-dirictory, env.name, 'Mobile') }}" - macos-project-file: "${{ format(env.project-file-template, env.root-dirictory, env.name, 'Mobile') }}" - wasm-project-file: "${{ format(env.project-file-template, env.root-dirictory, env.name, 'Wasm') }}" - windows-project-file: "${{ format(env.project-file-template, env.root-dirictory, env.name, 'Windows') }}" - - - name: Setup the Uno Platform - uses: ./.github/actions/setup-uno-platform - - - name: Build - uses: ./.github/actions/build-uno-project - with: - project-map: ${{ steps.init-projects.outputs.map }} - configuration: ${{ env.configuration }} - target: ${{ env.target }} + - name: Setup the Uno Platform + uses: finebits/github-actions/devhub/uno-platform/setup@8f808eb66ee57460326283fdeedde8c63986be00 # v1.6.0-prerelease + + - name: Build via dotnet + if: ${{ matrix.build.tool == 'dotnet' }} + shell: bash + run: | + project=${{ matrix.project }} + configuration=${{ matrix.build.configuration }} + extra_options=${{ matrix.build.extra }} + + dotnet build --configuration=$configuration $extra_options $project + + - name: Build via msbuild + if: ${{ matrix.build.tool == 'msbuild' }} + shell: bash + run: | + project=${{ matrix.project }} + configuration=${{ matrix.build.configuration }} + extra_options=${{ matrix.build.extra }} + + msbuild --target:Rebuild -restore:True -property:Configuration=$configuration $extra_options $project From cb9d1ad919d162fe19b54b774aee69831cfa3a3d Mon Sep 17 00:00:00 2001 From: alexander Date: Wed, 18 Sep 2024 12:08:39 +0300 Subject: [PATCH 03/18] ci: fix build yaml References: Eppie-io/Eppie-App#332 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 386ac9ec..c20f1277 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: id: build-config uses: finebits/github-actions/toolset/select-configuration@8f808eb66ee57460326283fdeedde8c63986be00 # v1.6.0-prerelease with: - json-file: ./.github/configuration/build.json + json-file: ./.github/configurations/build.json keywords: "all" build: From 91ce66364b6f7f90a91b1c8b92b7e86ce01b02d3 Mon Sep 17 00:00:00 2001 From: alexander Date: Wed, 18 Sep 2024 12:15:45 +0300 Subject: [PATCH 04/18] ci: fix the json build configuration References: Eppie-io/Eppie-App#332 --- .github/configurations/build.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/configurations/build.json b/.github/configurations/build.json index 008ac48a..f47f04d0 100644 --- a/.github/configurations/build.json +++ b/.github/configurations/build.json @@ -5,7 +5,7 @@ "all" ], "os": [ - "windwos-latest" + "windows-latest" ], "project":"./source/Eppie.App/Eppie.App/Eppie.App.csproj", "build": { @@ -36,7 +36,7 @@ "all" ], "os": [ - "windwos-latest" + "windows-latest" ], "project":"./source/Eppie.App/Eppie.App.UWP/Eppie.App.UWP.csproj", "build": { From 7edd4d0f6a40b98a5ac00bf84648b5ee2800dabd Mon Sep 17 00:00:00 2001 From: alexander Date: Thu, 19 Sep 2024 12:12:06 +0300 Subject: [PATCH 05/18] ci: update the version of actions References: Eppie-io/Eppie-App#332 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c20f1277..e1a069b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: - name: config id: build-config - uses: finebits/github-actions/toolset/select-configuration@8f808eb66ee57460326283fdeedde8c63986be00 # v1.6.0-prerelease + uses: finebits/github-actions/toolset/select-configuration@6fdb3f66a81cb4c285a41ae140b47ab3c5eb4864 # v1.6.0-prerelease with: json-file: ./.github/configurations/build.json keywords: "all" @@ -82,7 +82,7 @@ jobs: uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0 - name: Setup the Uno Platform - uses: finebits/github-actions/devhub/uno-platform/setup@8f808eb66ee57460326283fdeedde8c63986be00 # v1.6.0-prerelease + uses: finebits/github-actions/devhub/uno-platform/setup@6fdb3f66a81cb4c285a41ae140b47ab3c5eb4864 # v1.6.0-prerelease - name: Build via dotnet if: ${{ matrix.build.tool == 'dotnet' }} From cb313ce454d2dce7b895c36e54685bf635443c25 Mon Sep 17 00:00:00 2001 From: alexander Date: Thu, 19 Sep 2024 12:34:48 +0300 Subject: [PATCH 06/18] ci: fix build yaml References: Eppie-io/Eppie-App#332 --- .github/configurations/build.json | 18 +++++++++++++++--- .github/workflows/build.yml | 16 +++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/configurations/build.json b/.github/configurations/build.json index f47f04d0..deef4cbe 100644 --- a/.github/configurations/build.json +++ b/.github/configurations/build.json @@ -7,7 +7,11 @@ "os": [ "windows-latest" ], - "project":"./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "true", + "uno-platform": "true" + }, "build": { "tool": "msbuild", "configuration": "release", @@ -23,7 +27,11 @@ "macos-latest", "ubuntu-latest" ], - "project":"./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, "build": { "tool": "dotnet", "configuration": "release", @@ -38,7 +46,11 @@ "os": [ "windows-latest" ], - "project":"./source/Eppie.App/Eppie.App.UWP/Eppie.App.UWP.csproj", + "project": "./source/Eppie.App/Eppie.App.UWP/Eppie.App.UWP.csproj", + "prerequisites": { + "msbuild": "true", + "uno-platform": "false" + }, "build": { "tool": "msbuild", "configuration": "release", diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1a069b5..303f1366 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: strategy: matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} - runs-on: ${{ matrix.os }} + runs-on: ${{ fromJson(matrix.os) }} env: configuration: ${{ matrix.configuration }} @@ -79,13 +79,15 @@ jobs: dotnet-version: ${{ env.dotnet-version }} - name: Setup msbuild + if: matrix.prerequisites.msbuild == 'true' uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0 - name: Setup the Uno Platform + if: matrix.prerequisites.uno-platform == 'true' uses: finebits/github-actions/devhub/uno-platform/setup@6fdb3f66a81cb4c285a41ae140b47ab3c5eb4864 # v1.6.0-prerelease - name: Build via dotnet - if: ${{ matrix.build.tool == 'dotnet' }} + if: matrix.build.tool == 'dotnet' shell: bash run: | project=${{ matrix.project }} @@ -95,11 +97,11 @@ jobs: dotnet build --configuration=$configuration $extra_options $project - name: Build via msbuild - if: ${{ matrix.build.tool == 'msbuild' }} - shell: bash + if: matrix.build.tool == 'msbuild' && runner.os != 'Windows' + shell: pwsh run: | - project=${{ matrix.project }} - configuration=${{ matrix.build.configuration }} - extra_options=${{ matrix.build.extra }} + $project=${{ matrix.project }} + $configuration=${{ matrix.build.configuration }} + $extra_options=${{ matrix.build.extra }} msbuild --target:Rebuild -restore:True -property:Configuration=$configuration $extra_options $project From 1e1ca07b82344b2d2319697d8018a2c49b966b3f Mon Sep 17 00:00:00 2001 From: alexander Date: Thu, 19 Sep 2024 12:38:22 +0300 Subject: [PATCH 07/18] ci: fix build yaml References: Eppie-io/Eppie-App#332 --- .github/configurations/build.json | 28 +++++++++++++++++++--------- .github/workflows/build.yml | 4 ++-- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/configurations/build.json b/.github/configurations/build.json index deef4cbe..ccdd9c12 100644 --- a/.github/configurations/build.json +++ b/.github/configurations/build.json @@ -4,9 +4,7 @@ "uno", "all" ], - "os": [ - "windows-latest" - ], + "os": "windows-latest", "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", "prerequisites": { "msbuild": "true", @@ -23,10 +21,24 @@ "uno", "all" ], - "os": [ - "macos-latest", - "ubuntu-latest" + "os": "ubuntu-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "extra": "--verbosity" + } + }, + { + "keywords": [ + "uno", + "all" ], + "os": "macos-latest", "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", "prerequisites": { "msbuild": "false", @@ -43,9 +55,7 @@ "uwp", "all" ], - "os": [ - "windows-latest" - ], + "os": "windows-latest", "project": "./source/Eppie.App/Eppie.App.UWP/Eppie.App.UWP.csproj", "prerequisites": { "msbuild": "true", diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 303f1366..82f33a2a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: strategy: matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} - runs-on: ${{ fromJson(matrix.os) }} + runs-on: ${{ matrix.os }} env: configuration: ${{ matrix.configuration }} @@ -97,7 +97,7 @@ jobs: dotnet build --configuration=$configuration $extra_options $project - name: Build via msbuild - if: matrix.build.tool == 'msbuild' && runner.os != 'Windows' + if: matrix.build.tool == 'msbuild' && runner.os == 'Windows' shell: pwsh run: | $project=${{ matrix.project }} From 1f20752f9cd43dcecaad2cdbc9a6d245ed0e36bf Mon Sep 17 00:00:00 2001 From: alexander Date: Thu, 19 Sep 2024 12:42:38 +0300 Subject: [PATCH 08/18] ci: fix build yaml References: Eppie-io/Eppie-App#332 --- .github/workflows/build.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 82f33a2a..5f3a5390 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,6 +56,7 @@ jobs: needs: prepare strategy: + fail-fast: false matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} runs-on: ${{ matrix.os }} @@ -90,9 +91,9 @@ jobs: if: matrix.build.tool == 'dotnet' shell: bash run: | - project=${{ matrix.project }} - configuration=${{ matrix.build.configuration }} - extra_options=${{ matrix.build.extra }} + project='${{ matrix.project }}' + configuration='${{ matrix.build.configuration }}' + extra_options='${{ matrix.build.extra }}' dotnet build --configuration=$configuration $extra_options $project @@ -100,8 +101,8 @@ jobs: if: matrix.build.tool == 'msbuild' && runner.os == 'Windows' shell: pwsh run: | - $project=${{ matrix.project }} - $configuration=${{ matrix.build.configuration }} - $extra_options=${{ matrix.build.extra }} + $project='${{ matrix.project }}' + $configuration='${{ matrix.build.configuration }}' + $extra_options='${{ matrix.build.extra }}' msbuild --target:Rebuild -restore:True -property:Configuration=$configuration $extra_options $project From e4511040b8fb2ccd14d47184c863144184f55a4c Mon Sep 17 00:00:00 2001 From: alexander Date: Thu, 19 Sep 2024 12:52:26 +0300 Subject: [PATCH 09/18] ci: fix the json build configuration References: Eppie-io/Eppie-App#332 --- .github/configurations/build.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/configurations/build.json b/.github/configurations/build.json index ccdd9c12..85d767c4 100644 --- a/.github/configurations/build.json +++ b/.github/configurations/build.json @@ -13,7 +13,7 @@ "build": { "tool": "msbuild", "configuration": "release", - "extra": "-verbosity:detailed" + "extra": "-verbosity:normal" } }, { @@ -30,7 +30,7 @@ "build": { "tool": "dotnet", "configuration": "release", - "extra": "--verbosity" + "extra": "--verbosity=normal" } }, { @@ -47,7 +47,7 @@ "build": { "tool": "dotnet", "configuration": "release", - "extra": "--verbosity" + "extra": "--verbosity=normal" } }, { @@ -64,7 +64,7 @@ "build": { "tool": "msbuild", "configuration": "release", - "extra": "-verbosity:detailed" + "extra": "-verbosity:normal" } } ] \ No newline at end of file From dfee74b5df38ff70f33771899d8495439e844075 Mon Sep 17 00:00:00 2001 From: alexander Date: Thu, 19 Sep 2024 13:08:58 +0300 Subject: [PATCH 10/18] ci: change build yaml References: Eppie-io/Eppie-App#332 --- .github/configurations/build.json | 8 ++++---- .github/workflows/build.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/configurations/build.json b/.github/configurations/build.json index 85d767c4..bdc2e9c4 100644 --- a/.github/configurations/build.json +++ b/.github/configurations/build.json @@ -13,7 +13,7 @@ "build": { "tool": "msbuild", "configuration": "release", - "extra": "-verbosity:normal" + "extra": "-verbosity:minimal" } }, { @@ -30,7 +30,7 @@ "build": { "tool": "dotnet", "configuration": "release", - "extra": "--verbosity=normal" + "extra": "--verbosity=minimal" } }, { @@ -47,7 +47,7 @@ "build": { "tool": "dotnet", "configuration": "release", - "extra": "--verbosity=normal" + "extra": "--verbosity=minimal" } }, { @@ -64,7 +64,7 @@ "build": { "tool": "msbuild", "configuration": "release", - "extra": "-verbosity:normal" + "extra": "-verbosity:minimal" } } ] \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5f3a5390..e6694392 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,7 +56,7 @@ jobs: needs: prepare strategy: - fail-fast: false + fail-fast: true matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} runs-on: ${{ matrix.os }} From d728b4837e9ead67f57b352b246b46be3eef5b0a Mon Sep 17 00:00:00 2001 From: alexander Date: Thu, 19 Sep 2024 15:07:07 +0300 Subject: [PATCH 11/18] ci: change build yaml References: Eppie-io/Eppie-App#332 --- .github/configurations/build.json | 166 +++++++++++++++++++++++++++++- .github/workflows/build.yml | 8 +- 2 files changed, 169 insertions(+), 5 deletions(-) diff --git a/.github/configurations/build.json b/.github/configurations/build.json index bdc2e9c4..07e7483a 100644 --- a/.github/configurations/build.json +++ b/.github/configurations/build.json @@ -1,6 +1,132 @@ [ { "keywords": [ + "desktop", + "windows", + "uno", + "all" + ], + "os": "windows-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "framework": "net8.0-desktop", + "extra": "--verbosity=minimal" + } + }, + { + "keywords": [ + "desktop", + "linux", + "uno", + "all" + ], + "os": "ubuntu-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "framework": "net8.0-desktop", + "extra": "--verbosity=minimal" + } + }, + { + "keywords": [ + "desktop", + "macos", + "uno", + "all" + ], + "os": "macos-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "framework": "net8.0-desktop", + "extra": "--verbosity=minimal" + } + }, + + + { + "keywords": [ + "wasm", + "windows", + "uno", + "all" + ], + "os": "windows-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "framework": "net8.0-browserwasm", + "extra": "--verbosity=minimal" + } + }, + { + "keywords": [ + "wasm", + "linux", + "uno", + "all" + ], + "os": "ubuntu-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "framework": "net8.0-browserwasm", + "extra": "--verbosity=minimal" + } + }, + { + "keywords": [ + "wasm", + "macos", + "uno", + "all" + ], + "os": "macos-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "framework": "net8.0-browserwasm", + "extra": "--verbosity=minimal" + } + }, + + + { + "keywords": [ + "winui", + "windows", "uno", "all" ], @@ -13,15 +139,19 @@ "build": { "tool": "msbuild", "configuration": "release", - "extra": "-verbosity:minimal" + "framework": "net8.0-windows10.0.19041", + "extra": "-verbosity:minimal -consoleLoggerParameters:Summary" } }, + { "keywords": [ + "ios", + "macos", "uno", "all" ], - "os": "ubuntu-latest", + "os": "macos-latest", "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", "prerequisites": { "msbuild": "false", @@ -30,11 +160,15 @@ "build": { "tool": "dotnet", "configuration": "release", + "framework": "net8.0-ios", "extra": "--verbosity=minimal" } }, + { "keywords": [ + "maccatalyst", + "macos", "uno", "all" ], @@ -47,12 +181,37 @@ "build": { "tool": "dotnet", "configuration": "release", + "framework": "net8.0-maccatalyst", + "extra": "--verbosity=minimal" + } + }, + + + { + "keywords": [ + "android", + "linux", + "uno", + "all" + ], + "os": "ubuntu-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "framework": "net8.0-android", "extra": "--verbosity=minimal" } }, + { "keywords": [ "uwp", + "windows", "all" ], "os": "windows-latest", @@ -64,7 +223,8 @@ "build": { "tool": "msbuild", "configuration": "release", - "extra": "-verbosity:minimal" + "framework": "", + "extra": "-verbosity:minimal -consoleLoggerParameters:Summary" } } ] \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6694392..c66d1a86 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,8 +94,9 @@ jobs: project='${{ matrix.project }}' configuration='${{ matrix.build.configuration }}' extra_options='${{ matrix.build.extra }}' + framework='${{ matrix.build.framework }}' - dotnet build --configuration=$configuration $extra_options $project + dotnet build --configuration=$configuration --framework=$framework $extra_options $project - name: Build via msbuild if: matrix.build.tool == 'msbuild' && runner.os == 'Windows' @@ -105,4 +106,7 @@ jobs: $configuration='${{ matrix.build.configuration }}' $extra_options='${{ matrix.build.extra }}' - msbuild --target:Rebuild -restore:True -property:Configuration=$configuration $extra_options $project + $framework='${{ matrix.build.framework }}' + $framework_option=$( if($framework) {"-property:TargetFramework=$framework"} else {""} ) + + msbuild --target:Rebuild -restore:True -property:Configuration=$configuration $framework_option $extra_options $project From 9bf74a2bcbcf3d70f6d7d30bb521a7594234d47a Mon Sep 17 00:00:00 2001 From: alexander Date: Thu, 19 Sep 2024 15:29:34 +0300 Subject: [PATCH 12/18] ci: fix build yaml References: Eppie-io/Eppie-App#332 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c66d1a86..f962c1c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -104,7 +104,7 @@ jobs: run: | $project='${{ matrix.project }}' $configuration='${{ matrix.build.configuration }}' - $extra_options='${{ matrix.build.extra }}' + $extra_options=$('${{ matrix.build.extra }}' -split '\s+') $framework='${{ matrix.build.framework }}' $framework_option=$( if($framework) {"-property:TargetFramework=$framework"} else {""} ) From b7048527ab063886d0666c4662ca76b75bf74d11 Mon Sep 17 00:00:00 2001 From: alexander Date: Thu, 19 Sep 2024 18:15:23 +0300 Subject: [PATCH 13/18] ci: change build yaml References: Eppie-io/Eppie-App#332 --- .github/configurations/build.json | 2 +- .github/workflows/build.yml | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/configurations/build.json b/.github/configurations/build.json index 07e7483a..c981ba21 100644 --- a/.github/configurations/build.json +++ b/.github/configurations/build.json @@ -223,7 +223,7 @@ "build": { "tool": "msbuild", "configuration": "release", - "framework": "", + "framework": "uap10.0.19041", "extra": "-verbosity:minimal -consoleLoggerParameters:Summary" } } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f962c1c9..fa16ae00 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,7 +53,7 @@ jobs: keywords: "all" build: - + name: ${{ matrix.os }} ${{ matrix.build.framework }} '${{ matrix.project }}' needs: prepare strategy: fail-fast: true @@ -105,8 +105,6 @@ jobs: $project='${{ matrix.project }}' $configuration='${{ matrix.build.configuration }}' $extra_options=$('${{ matrix.build.extra }}' -split '\s+') - $framework='${{ matrix.build.framework }}' - $framework_option=$( if($framework) {"-property:TargetFramework=$framework"} else {""} ) - msbuild --target:Rebuild -restore:True -property:Configuration=$configuration $framework_option $extra_options $project + msbuild -target:Rebuild -restore:True -property:Configuration=$configuration -property:TargetFramework=$framework $extra_options $project From 79fc661a69e3d23d35d1ddf78f6f3ea623c4d85f Mon Sep 17 00:00:00 2001 From: alexander Date: Fri, 20 Sep 2024 12:46:52 +0300 Subject: [PATCH 14/18] ci: update the version of actions References: Eppie-io/Eppie-App#332 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa16ae00..f1f9b7cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: - name: config id: build-config - uses: finebits/github-actions/toolset/select-configuration@6fdb3f66a81cb4c285a41ae140b47ab3c5eb4864 # v1.6.0-prerelease + uses: finebits/github-actions/toolset/select-configuration@4a126d80a11c5fdc83ce884d3d23dffb30bc4495 # v2.0.0 with: json-file: ./.github/configurations/build.json keywords: "all" @@ -85,7 +85,7 @@ jobs: - name: Setup the Uno Platform if: matrix.prerequisites.uno-platform == 'true' - uses: finebits/github-actions/devhub/uno-platform/setup@6fdb3f66a81cb4c285a41ae140b47ab3c5eb4864 # v1.6.0-prerelease + uses: finebits/github-actions/devhub/uno-platform/setup@4a126d80a11c5fdc83ce884d3d23dffb30bc4495 # v2.0.0 - name: Build via dotnet if: matrix.build.tool == 'dotnet' From 94aea66d12f96ba37246d3686df2b202eff37568 Mon Sep 17 00:00:00 2001 From: alexander Date: Fri, 20 Sep 2024 15:22:48 +0300 Subject: [PATCH 15/18] ci: add workflow inputs References: Eppie-io/Eppie-App#332 --- .github/configurations/build.json | 77 +++++++++++++++++++++++++++---- .github/workflows/build.yml | 42 +++++++++++++++-- 2 files changed, 106 insertions(+), 13 deletions(-) diff --git a/.github/configurations/build.json b/.github/configurations/build.json index c981ba21..b7ee0df8 100644 --- a/.github/configurations/build.json +++ b/.github/configurations/build.json @@ -16,7 +16,7 @@ "tool": "dotnet", "configuration": "release", "framework": "net8.0-desktop", - "extra": "--verbosity=minimal" + "extra": "--verbosity=minimal --nologo" } }, { @@ -36,7 +36,7 @@ "tool": "dotnet", "configuration": "release", "framework": "net8.0-desktop", - "extra": "--verbosity=minimal" + "extra": "--verbosity=minimal --nologo" } }, { @@ -56,7 +56,7 @@ "tool": "dotnet", "configuration": "release", "framework": "net8.0-desktop", - "extra": "--verbosity=minimal" + "extra": "--verbosity=minimal --nologo" } }, @@ -78,7 +78,7 @@ "tool": "dotnet", "configuration": "release", "framework": "net8.0-browserwasm", - "extra": "--verbosity=minimal" + "extra": "--verbosity=minimal --nologo" } }, { @@ -98,7 +98,7 @@ "tool": "dotnet", "configuration": "release", "framework": "net8.0-browserwasm", - "extra": "--verbosity=minimal" + "extra": "--verbosity=minimal --nologo" } }, { @@ -118,7 +118,7 @@ "tool": "dotnet", "configuration": "release", "framework": "net8.0-browserwasm", - "extra": "--verbosity=minimal" + "extra": "--verbosity=minimal --nologo" } }, @@ -161,7 +161,7 @@ "tool": "dotnet", "configuration": "release", "framework": "net8.0-ios", - "extra": "--verbosity=minimal" + "extra": "--verbosity=minimal --nologo" } }, @@ -182,11 +182,30 @@ "tool": "dotnet", "configuration": "release", "framework": "net8.0-maccatalyst", - "extra": "--verbosity=minimal" + "extra": "--verbosity=minimal --nologo" } }, - + { + "keywords": [ + "android", + "windows", + "uno", + "all" + ], + "os": "windows-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "framework": "net8.0-android", + "extra": "--verbosity=minimal --nologo" + } + }, { "keywords": [ "android", @@ -204,7 +223,27 @@ "tool": "dotnet", "configuration": "release", "framework": "net8.0-android", - "extra": "--verbosity=minimal" + "extra": "--verbosity=minimal --nologo" + } + }, + { + "keywords": [ + "android", + "macos", + "uno", + "all" + ], + "os": "macos-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "framework": "net8.0-android", + "extra": "--verbosity=minimal --nologo" } }, @@ -212,6 +251,7 @@ "keywords": [ "uwp", "windows", + "autobuild", "all" ], "os": "windows-latest", @@ -226,5 +266,22 @@ "framework": "uap10.0.19041", "extra": "-verbosity:minimal -consoleLoggerParameters:Summary" } + }, + + { + "keywords": [ + "autobuild" + ], + "os": "windows-latest", + "project": "./source/Eppie.App/Eppie.App/Eppie.App.csproj", + "prerequisites": { + "msbuild": "false", + "uno-platform": "true" + }, + "build": { + "tool": "dotnet", + "configuration": "release", + "extra": "--verbosity=minimal --nologo" + } } ] \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1f9b7cc..e86cde71 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,28 @@ name: "Build solution" on: # yamllint disable-line rule:truthy workflow_dispatch: + inputs: + framework: + type: choice + default: all + options: + - desktop + - wasm + - winui + - ios + - macos + - android + - uwp + - all + os: + type: choice + default: all + options: + - windows + - linux + - macos + - all + push: branches: - main @@ -45,12 +67,24 @@ jobs: with: fetch-depth: 0 + - name: Initializing default keywords + if: github.event_name != 'workflow_dispatch' + shell: bash + run: | + echo "BUILD_CONFIG_KEYWORDS=autobuild" >> $GITHUB_ENV + + - name: Read input keywords + if: github.event_name == 'workflow_dispatch' + shell: bash + run: | + echo "BUILD_CONFIG_KEYWORDS=${{ github.event.inputs.framework }},${{ github.event.inputs.os }}" >> $GITHUB_ENV + - name: config id: build-config uses: finebits/github-actions/toolset/select-configuration@4a126d80a11c5fdc83ce884d3d23dffb30bc4495 # v2.0.0 with: json-file: ./.github/configurations/build.json - keywords: "all" + keywords: ${{ env.BUILD_CONFIG_KEYWORDS }} build: name: ${{ matrix.os }} ${{ matrix.build.framework }} '${{ matrix.project }}' @@ -95,8 +129,9 @@ jobs: configuration='${{ matrix.build.configuration }}' extra_options='${{ matrix.build.extra }}' framework='${{ matrix.build.framework }}' + framework_option=$([ "$framework" != "" ] && echo "--framework=$framework" || echo "") - dotnet build --configuration=$configuration --framework=$framework $extra_options $project + dotnet build --configuration=$configuration $framework_option $extra_options $project - name: Build via msbuild if: matrix.build.tool == 'msbuild' && runner.os == 'Windows' @@ -106,5 +141,6 @@ jobs: $configuration='${{ matrix.build.configuration }}' $extra_options=$('${{ matrix.build.extra }}' -split '\s+') $framework='${{ matrix.build.framework }}' + $framework_option=$( if($framework) {"-property:TargetFramwork=$framework"} else {""} ) - msbuild -target:Rebuild -restore:True -property:Configuration=$configuration -property:TargetFramework=$framework $extra_options $project + msbuild -target:Rebuild -restore:True -property:Configuration=$configuration $framework_option $extra_options $project From 311d633f49ced792fe1faa91059c3f2a2ae439b9 Mon Sep 17 00:00:00 2001 From: alexander Date: Fri, 20 Sep 2024 15:31:50 +0300 Subject: [PATCH 16/18] ci: add config check References: Eppie-io/Eppie-App#332 --- .github/workflows/build.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e86cde71..1c5486ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,13 +79,24 @@ jobs: run: | echo "BUILD_CONFIG_KEYWORDS=${{ github.event.inputs.framework }},${{ github.event.inputs.os }}" >> $GITHUB_ENV - - name: config + - name: Select configs id: build-config uses: finebits/github-actions/toolset/select-configuration@4a126d80a11c5fdc83ce884d3d23dffb30bc4495 # v2.0.0 with: json-file: ./.github/configurations/build.json keywords: ${{ env.BUILD_CONFIG_KEYWORDS }} + - name: Check configs + shell: bash + run: | + config='${{ steps.build-config.outputs.config-json }}' + length=$( echo $config | jq '.include | length' ) + + if(( $length == 0 )); then + echo "::error::No suitable build configuration found" + exit 1 + fi + build: name: ${{ matrix.os }} ${{ matrix.build.framework }} '${{ matrix.project }}' needs: prepare From 4b4cfbc663a2338a8989b041d51d8e50071cc163 Mon Sep 17 00:00:00 2001 From: alexander Date: Fri, 20 Sep 2024 15:34:45 +0300 Subject: [PATCH 17/18] ci: fix config check References: Eppie-io/Eppie-App#332 --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c5486ad..015d5119 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,8 +89,7 @@ jobs: - name: Check configs shell: bash run: | - config='${{ steps.build-config.outputs.config-json }}' - length=$( echo $config | jq '.include | length' ) + length=$( echo '${{ steps.build-config.outputs.config-json }}' | jq '. | length' ) if(( $length == 0 )); then echo "::error::No suitable build configuration found" From 654598a63b51f7373c0ba689dc0246c5cfd7d484 Mon Sep 17 00:00:00 2001 From: alexander Date: Fri, 20 Sep 2024 15:55:31 +0300 Subject: [PATCH 18/18] ci: add a PR trigger for the branch 'uno-platform-5' References: Eppie-io/Eppie-App#332 --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 015d5119..6b6ef22d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,10 +48,12 @@ on: # yamllint disable-line rule:truthy branches: - main - release/** + - feature/296-upgrading-to-uno-platform-5 # temporarily pull_request: branches: - main - release/** + - feature/296-upgrading-to-uno-platform-5 # temporarily jobs: