2022-07-27 14:27:25 +02:00
|
|
|
name: tarball
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
paths:
|
2022-08-03 16:26:06 +02:00
|
|
|
- '.github/workflows/tarball.yml'
|
2022-07-27 14:27:25 +02:00
|
|
|
- '**.go'
|
|
|
|
- 'go.*'
|
|
|
|
- 'Makefile'
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
paths:
|
2022-08-03 16:26:06 +02:00
|
|
|
- '.github/workflows/tarball.yml'
|
2022-07-27 14:27:25 +02:00
|
|
|
- '**.go'
|
|
|
|
- 'go.*'
|
|
|
|
- 'Makefile'
|
|
|
|
|
2023-01-17 11:29:54 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-07-27 14:27:25 +02:00
|
|
|
jobs:
|
|
|
|
create:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
go-version:
|
2023-02-02 13:25:39 +01:00
|
|
|
- "1.20"
|
2023-08-09 09:00:46 +02:00
|
|
|
- "1.21"
|
2024-02-07 08:44:55 +01:00
|
|
|
- "1.22"
|
2022-07-27 14:27:25 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-04 22:25:17 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-06 21:59:16 +01:00
|
|
|
- uses: actions/setup-go@v5
|
2022-07-27 14:27:25 +02:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- 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
|
2023-12-18 08:34:25 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-07-27 14:27:25 +02:00
|
|
|
with:
|
|
|
|
name: tarball-${{ matrix.go-version }}
|
|
|
|
path: nextcloud-spreed-signaling*.tar.gz
|
|
|
|
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
go-version:
|
2023-02-02 13:25:39 +01:00
|
|
|
- "1.20"
|
2023-08-09 09:00:46 +02:00
|
|
|
- "1.21"
|
2024-02-07 08:44:55 +01:00
|
|
|
- "1.22"
|
2022-07-27 14:27:25 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [create]
|
|
|
|
steps:
|
2023-12-06 21:59:16 +01:00
|
|
|
- uses: actions/setup-go@v5
|
2022-07-27 14:27:25 +02:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt -y update && sudo apt -y install protobuf-compiler
|
|
|
|
|
|
|
|
- name: Download tarball
|
2023-12-18 08:34:25 +01:00
|
|
|
uses: actions/download-artifact@v4
|
2022-07-27 14:27:25 +02:00
|
|
|
with:
|
|
|
|
name: tarball-${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Extract tarball
|
|
|
|
run: |
|
|
|
|
mkdir -p tmp
|
2023-06-07 17:22:30 +02:00
|
|
|
tar xvf nextcloud-spreed-signaling*.tar.gz --strip-components=1 -C tmp
|
2022-07-27 14:27:25 +02:00
|
|
|
[ -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
|
2024-04-02 16:52:06 +02:00
|
|
|
USE_DB_IP_GEOIP_DATABASE: "1"
|
2022-07-27 14:27:25 +02:00
|
|
|
run: |
|
2023-01-17 15:15:00 +01:00
|
|
|
make -C tmp test TIMEOUT=120s
|