diff --git a/.github/workflows/pr_validation.yml b/.github/workflows/pr_validation.yml index 15acd8d..43b5253 100644 --- a/.github/workflows/pr_validation.yml +++ b/.github/workflows/pr_validation.yml @@ -1,19 +1,3 @@ -# ------------------------------------------------------------------------------ -# -# -# This code was generated. -# -# - To turn off auto-generation set: -# -# [CustomGitHubActions (AutoGenerate = false)] -# -# - To trigger manual generation invoke: -# -# nuke --generate-configuration GitHubActions_pr_validation --host GitHubActions -# -# -# ------------------------------------------------------------------------------ - name: pr_validation on: @@ -27,21 +11,29 @@ on: - dev jobs: - windows-latest: - name: windows-latest - runs-on: windows-latest + build: + name: Build on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v1 - - name: Make build.sh executable - run: chmod +x ./build.sh - - name: Make build.cmd executable - run: chmod +x ./build.cmd - - uses: actions/setup-dotnet@v1 + - uses: actions/checkout@v3 + + - name: Make build scripts executable + if: runner.os != 'Windows' + run: | + chmod +x ./build.sh + chmod +x ./build.cmd + + - uses: actions/setup-dotnet@v2 with: dotnet-version: 5.0.* - - uses: actions/setup-dotnet@v1 + + - uses: actions/setup-dotnet@v2 with: dotnet-version: 6.0.* + - name: Cache .nuke/temp, ~/.nuget/packages uses: actions/cache@v2 with: @@ -49,39 +41,12 @@ jobs: .nuke/temp ~/.nuget/packages key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }} + - name: dotnet nuget run: dotnet nuget add source -n Phobos "${{ secrets.CUSTOMNUGETSOURCE }}" + - name: Run './build.cmd All' run: ./build.cmd All env: CustomNuGetSource: ${{ secrets.CUSTOMNUGETSOURCE }} - GITHUB_CONTEXT: ${{ toJSON(github) }} - ubuntu-latest: - name: ubuntu-latest - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Make build.sh executable - run: chmod +x ./build.sh - - name: Make build.cmd executable - run: chmod +x ./build.cmd - - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.* - - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 6.0.* - - name: Cache .nuke/temp, ~/.nuget/packages - uses: actions/cache@v2 - with: - path: | - .nuke/temp - ~/.nuget/packages - key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }} - - name: dotnet nuget - run: dotnet nuget add source -n Phobos ${{ secrets.CUSTOMNUGETSOURCE }} - - name: Run './build.cmd All' - run: ./build.cmd All - env: - CustomNuGetSource: ${{ secrets.CUSTOMNUGETSOURCE }} - GITHUB_CONTEXT: ${{ toJSON(github) }} + GITHUB_CONTEXT: ${{ toJSON(github) }} \ No newline at end of file