Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache build tools #3127

Merged
merged 4 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 50 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,49 @@ jobs:
image: mono:${{ matrix.mono }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Installing build dependencies
run: apt-get update && apt-get install -y git
- name: Install runtime dependencies
run: apt-get install -y xvfb
- name: Restore cache for _build/lib/nuget
uses: actions/cache@v1
with:
path: _build/lib/nuget
key: nuget-oldref-modules-${{ hashFiles('**/packages.config') }}-${{ hashFiles('**/*.csproj') }}
- name: Restore cache for ~/.nuget/packages
uses: actions/cache@v1
with:
path: ~/.nuget/packages
key: nuget-packref-modules-${{ hashFiles('**/packages.config') }}-${{ hashFiles('**/*.csproj') }}
- name: Installing build dependencies
run: apt-get update && apt-get install -y git
- name: Install runtime dependencies
run: apt-get install -y xvfb
- name: Restore cache for _build/tools
uses: actions/cache@v1
with:
path: _build/tools
key: build-tools-${{ hashFiles('build', 'build.ps1', 'build.cake') }}
- name: Restore cache for _build/cake
uses: actions/cache@v1
with:
path: _build/cake
key: build-cake-${{ hashFiles('build.cake') }}
- name: Restore cache for _build/lib/nuget
uses: actions/cache@v1
with:
path: _build/lib/nuget
key: nuget-oldref-modules-${{ hashFiles('**/packages.config') }}-${{ hashFiles('**/*.csproj') }}
- name: Restore cache for ~/.nuget/packages
uses: actions/cache@v1
with:
path: ~/.nuget/packages
key: nuget-packref-modules-${{ hashFiles('**/packages.config') }}-${{ hashFiles('**/*.csproj') }}

- name: Build ckan.exe and netkan.exe
run: ./build --configuration=${{ matrix.configuration}}
- name: Run tests
run: xvfb-run ./build test+only --configuration=${{ matrix.configuration }} --where="Category!=FlakyNetwork"
- name: Build ckan.exe and netkan.exe
run: ./build --configuration=${{ matrix.configuration}}
- name: Run tests
run: xvfb-run ./build test+only --configuration=${{ matrix.configuration }} --where="Category!=FlakyNetwork"

- name: Send Discord Notification
env:
JOB_STATUS: ${{ job.status }}
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
if: ${{ failure() && env.WEBHOOK_URL }}
run: |
git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
shell: bash
- name: Send Discord Notification
env:
JOB_STATUS: ${{ job.status }}
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
if: ${{ failure() && env.WEBHOOK_URL }}
run: |
git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
shell: bash


build_NetCore:
Expand All @@ -70,6 +80,16 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.301'
- name: Restore cache for _build/tools
uses: actions/cache@v1
with:
path: _build/tools
key: build-tools-${{ hashFiles('build', 'build.ps1', 'build.cake') }}
- name: Restore cache for _build/cake
uses: actions/cache@v1
with:
path: _build/cake
key: build-cake-${{ hashFiles('build.cake') }}
- name: Restore cache for _build/lib/nuget
uses: actions/cache@v1
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ jobs:
run: |
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
- name: Restore cache for _build/tools
uses: actions/cache@v1
with:
path: _build/tools
key: build-tools-${{ hashFiles('build', 'build.ps1', 'build.cake') }}
- name: Restore cache for _build/cake
uses: actions/cache@v1
with:
path: _build/cake
key: build-cake-${{ hashFiles('build.cake') }}
- name: Restore cache for _build/lib/nuget
uses: actions/cache@v1
with:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,26 @@ jobs:
run: apt-get update && apt-get install -y git make sed libplist-utils xorriso gzip fakeroot lintian rpm wget jq
- name: Installing runtime dependencies
run: apt-get install -y xvfb
- name: Restore cache for _build/tools
uses: actions/cache@v1
with:
path: _build/tools
key: build-tools-${{ hashFiles('build', 'build.ps1', 'build.cake') }}
- name: Restore cache for _build/cake
uses: actions/cache@v1
with:
path: _build/cake
key: build-cake-${{ hashFiles('build.cake') }}
- name: Restore cache for _build/lib/nuget
uses: actions/cache@v1
with:
path: _build/lib/nuget
key: nuget-oldref-modules-${{ hashFiles('**/packages.config') }}-${{ hashFiles('**/*.csproj') }}
- name: Restore cache for ~/.nuget/packages
uses: actions/cache@v1
with:
path: ~/.nuget/packages
key: nuget-packref-modules-${{ hashFiles('**/packages.config') }}-${{ hashFiles('**/*.csproj') }}

- name: Build ckan.exe and netkan.exe
run: ./build --configuration=Release
Expand Down