Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release/2.46
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed Aug 25, 2020
2 parents f382625 + a79aa06 commit 7d65e6b
Show file tree
Hide file tree
Showing 205 changed files with 8,193 additions and 2,565 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/snap-build.yaml

This file was deleted.

50 changes: 47 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,51 @@ on:
pull_request:
branches: [ "master", "release/**" ]
jobs:
snap-builds:
runs-on: ubuntu-16.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache snapd snap build status
id: cache-snapd-build-status
uses: actions/cache@v1
with:
path: "${{ github.workspace }}/.test-results"
key: "${{ github.run_id }}-${{ github.job }}-results"
- name: Check cached snap build
id: cached-results
run: |
CACHE_RESULT_STAMP="${{ github.workspace }}/.test-results/snap-build-success"
echo "::set-env name=CACHE_RESULT_STAMP::$CACHE_RESULT_STAMP"
if [ -e "$CACHE_RESULT_STAMP" ]; then
has_cached_snap=0
while read name; do
has_cached_snap=1
# bring back artifacts from the cache
cp -v "$name" "${{ github.workspace }}"
done < <(find "$(dirname $CACHE_RESULT_STAMP)" -name "*.snap")
if [ "$has_cached_snap" = "1" ]; then
# we have restored an artifact from the cache
echo "::set-output name=already-ran::true"
fi
fi
- name: Build snapd snap
if: steps.cached-results.outputs.already-ran != 'true'
uses: snapcore/action-build@v1
- name: Cache built artifact
run: |
mkdir -p $(dirname "$CACHE_RESULT_STAMP")
cp -v *.snap "$(dirname $CACHE_RESULT_STAMP)/"
- name: Uploading snapd snap artifact
uses: actions/upload-artifact@v2
with:
name: snap-files
path: "*.snap"
- name: Mark successful snap build
run: |
mkdir -p $(dirname "$CACHE_RESULT_STAMP")
touch "$CACHE_RESULT_STAMP"
unit-tests:
runs-on: ubuntu-16.04
env:
Expand All @@ -26,7 +71,7 @@ jobs:
matrix:
gochannel:
- 1.9
- latest/edge
- latest/stable
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -233,8 +278,7 @@ jobs:
run: |
# Register a problem matcher to highlight spread failures
echo "::add-matcher::.github/spread-problem-matcher.json"
export CORE_CHANNEL=edge
export BUILD_SNAPD_FROM_CURRENT=true
export SPREAD_BUILD_SNAPD_FROM_CURRENT=true
export SPREAD_ENABLE_KVM=true
if [ "${{ matrix.system }}" = "ubuntu-20.04-64" ]; then
export SPREAD_ENABLE_KVM=false
Expand Down
Loading

0 comments on commit 7d65e6b

Please sign in to comment.