mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-05-17 04:56:33 +02:00
075e50560e
Bumps the artifacts group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/upload-artifact` from 3 to 4 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) Updates `actions/download-artifact` from 3 to 4 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: artifacts - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: artifacts ... Signed-off-by: dependabot[bot] <support@github.com>
109 lines
2.6 KiB
YAML
109 lines
2.6 KiB
YAML
name: tarball
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- '.github/workflows/tarball.yml'
|
|
- '**.go'
|
|
- 'go.*'
|
|
- 'Makefile'
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- '.github/workflows/tarball.yml'
|
|
- '**.go'
|
|
- 'go.*'
|
|
- 'Makefile'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
create:
|
|
strategy:
|
|
matrix:
|
|
go-version:
|
|
- "1.20"
|
|
- "1.21"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- id: go-cache-paths
|
|
run: |
|
|
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
|
|
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
|
|
echo "go-version=$(go version | cut -d ' ' -f 3)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Go build cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.go-cache-paths.outputs.go-build }}
|
|
key: ${{ runner.os }}-${{ steps.go-cache-paths.outputs.go-version }}-build-${{ hashFiles('**/go.mod', '**/go.sum') }}
|
|
|
|
- name: Go mod cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
|
key: ${{ runner.os }}-${{ steps.go-cache-paths.outputs.go-version }}-mod-${{ hashFiles('**/go.mod', '**/go.sum') }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt -y update && sudo apt -y install protobuf-compiler
|
|
|
|
- name: Create tarball
|
|
run: |
|
|
echo "Building with $(nproc) threads"
|
|
make tarball
|
|
|
|
- name: Upload tarball
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: tarball-${{ matrix.go-version }}
|
|
path: nextcloud-spreed-signaling*.tar.gz
|
|
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
go-version:
|
|
- "1.20"
|
|
- "1.21"
|
|
runs-on: ubuntu-latest
|
|
needs: [create]
|
|
steps:
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt -y update && sudo apt -y install protobuf-compiler
|
|
|
|
- name: Download tarball
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: tarball-${{ matrix.go-version }}
|
|
|
|
- name: Extract tarball
|
|
run: |
|
|
mkdir -p tmp
|
|
tar xvf nextcloud-spreed-signaling*.tar.gz --strip-components=1 -C tmp
|
|
[ -d "tmp/vendor" ] || exit 1
|
|
|
|
- name: Build
|
|
env:
|
|
GOPROXY: off
|
|
run: |
|
|
echo "Building with $(nproc) threads"
|
|
make -C tmp build -j$(nproc)
|
|
|
|
- name: Run tests
|
|
env:
|
|
GOPROXY: off
|
|
run: |
|
|
make -C tmp test TIMEOUT=120s
|