From faeab7e6954269ee9e294c5d4683b375b615d769 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Wed, 2 Aug 2023 20:53:56 -0300 Subject: [PATCH] Build on windows-latest --- .github/workflows/build.yml | 29 +---------------------------- .github/workflows/publish.yml | 6 +++++- .netconfig | 8 ++------ Moq.sln | 2 +- src/Moq/Moq.csproj | 4 ++++ 5 files changed, 13 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0480456b9..d2742f16b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,29 +25,8 @@ defaults: shell: bash jobs: - os-matrix: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.lookup.outputs.matrix }} - steps: - - name: ๐Ÿค˜ checkout - uses: actions/checkout@v2 - - - name: ๐Ÿ”Ž lookup - id: lookup - shell: pwsh - run: | - $path = './.github/workflows/os-matrix.json' - $os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' } - echo "matrix=$os" >> $env:GITHUB_OUTPUT - build: - needs: os-matrix - name: build-${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }} + runs-on: windows-latest steps: - name: ๐Ÿค˜ checkout uses: actions/checkout@v2 @@ -58,12 +37,6 @@ jobs: - name: ๐Ÿ™ build run: dotnet build -m:1 - - name: โš™ GNU grep - if: matrix.os == 'macOS-latest' - run: | - brew install grep - echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile - - name: ๐Ÿงช test uses: ./.github/workflows/test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bd83ada82..f3e8d0a94 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,9 +11,13 @@ env: DOTNET_NOLOGO: true Configuration: Release +defaults: + run: + shell: bash + jobs: publish: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - name: ๐Ÿค˜ checkout uses: actions/checkout@v2 diff --git a/.netconfig b/.netconfig index 46a44b6ff..e5d80548a 100644 --- a/.netconfig +++ b/.netconfig @@ -48,9 +48,7 @@ weak [file ".github/workflows/build.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml - sha = 13d67e2cf3f786c8189364fd29332aaa7dc575dc - etag = c616df0877fba60002ccfc0397e9f731ddb22acbbb195a0598fedd4cac5f3135 - weak + skip [file ".github/workflows/changelog.config"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.config sha = 055a8b7c94b74ae139cce919d60b83976d2a9942 @@ -68,9 +66,7 @@ weak [file ".github/workflows/publish.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml - sha = d3022567c9ef2bc9461511e53b8abe065afdf03b - etag = 58601b5a71c805647ab26e84053acdfb8d174eaa93330487af8a5503753c5707 - weak + skip [file ".github/workflows/test/action.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/test/action.yml sha = 9a1b07589b9bde93bc12528e9325712a32dec418 diff --git a/Moq.sln b/Moq.sln index b7a59c07a..5075d6c07 100644 --- a/Moq.sln +++ b/Moq.sln @@ -5,7 +5,7 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A5A5B8C3-D43F-43C6-AEC7-6FA7C35B8BE9}" ProjectSection(SolutionItems) = preProject .netconfig = .netconfig - appveyor.yml = appveyor.yml + .github\workflows\build.yml = .github\workflows\build.yml CHANGELOG.md = CHANGELOG.md CONTRIBUTING.md = CONTRIBUTING.md src\Directory.props = src\Directory.props diff --git a/src/Moq/Moq.csproj b/src/Moq/Moq.csproj index a11932b8d..870e7b6e0 100644 --- a/src/Moq/Moq.csproj +++ b/src/Moq/Moq.csproj @@ -36,6 +36,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive +