Replace release.mk by release scripts

Since commit 2687d20280, the Makefile
named release.mk stopped handling dependencies between recipes, because
they have to be executed separately (from different Github Actions
jobs).

There is no real benefit using a Makefile anymore. Replace them by
several individual release scripts for simplicity and readability.
This commit is contained in:
Romain Vimont
2024-11-22 08:25:15 +01:00
parent 24588cb637
commit 6af81e10ba
13 changed files with 198 additions and 168 deletions

View File

@@ -6,11 +6,15 @@ on:
name:
description: 'Version name (default is ref name)'
env:
# $VERSION is used by release scripts
VERSION: ${{ github.event.inputs.name || github.ref_name }}
jobs:
build-scrcpy-server:
runs-on: ubuntu-latest
env:
GRADLE: gradle # use native gradle instead of ./gradlew in release.mk
GRADLE: gradle # use native gradle instead of ./gradlew in scripts
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -22,16 +26,16 @@ jobs:
java-version: '17'
- name: Test scrcpy-server
run: make -f release.mk test-server
run: release/test_server.sh
- name: Build scrcpy-server
run: make -f release.mk build-server
run: release/build_server.sh
- name: Upload scrcpy-server artifact
uses: actions/upload-artifact@v4
with:
name: scrcpy-server
path: build-server/server/scrcpy-server
path: release/work/build-server/server/scrcpy-server
test-client:
runs-on: ubuntu-latest
@@ -46,13 +50,8 @@ jobs:
libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev \
libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev
- name: Build
run: |
meson setup d -Db_sanitize=address,undefined
- name: Test
run: |
meson test -Cd
run: release/test_client.sh
build-win32:
runs-on: ubuntu-latest
@@ -71,14 +70,14 @@ jobs:
- name: Workaround for old meson version run by Github Actions
run: sed -i 's/^pkg-config/pkgconfig/' cross_win32.txt
- name: Build scrcpy win32
run: make -f release.mk build-win32
- name: Build win32
run: release/build_windows.sh 32
- name: Upload build-win32 artifact
uses: actions/upload-artifact@v4
with:
name: build-win32-intermediate
path: build-win32/dist/
path: release/work/build-win32/dist/
build-win64:
runs-on: ubuntu-latest
@@ -97,14 +96,14 @@ jobs:
- name: Workaround for old meson version run by Github Actions
run: sed -i 's/^pkg-config/pkgconfig/' cross_win64.txt
- name: Build scrcpy win64
run: make -f release.mk build-win64
- name: Build win64
run: release/build_windows.sh 64
- name: Upload build-win64 artifact
uses: actions/upload-artifact@v4
with:
name: build-win64-intermediate
path: build-win64/dist/
path: release/work/build-win64/dist/
package:
needs:
@@ -112,9 +111,6 @@ jobs:
- build-win32
- build-win64
runs-on: ubuntu-latest
env:
# $VERSION is used by release.mk
VERSION: ${{ github.event.inputs.name || github.ref_name }}
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -123,25 +119,34 @@ jobs:
uses: actions/download-artifact@v4
with:
name: scrcpy-server
path: build-server/server/
path: release/work/build-server/server/
- name: Download build-win32
uses: actions/download-artifact@v4
with:
name: build-win32-intermediate
path: build-win32/dist/
path: release/work/build-win32/dist/
- name: Download build-win64
uses: actions/download-artifact@v4
with:
name: build-win64-intermediate
path: build-win64/dist/
path: release/work/build-win64/dist/
- name: Package
run: make -f release.mk package
- name: Package server
run: release/package_server.sh
- name: Package win32
run: release/package_client.sh win32
- name: Package win64
run: release/package_client.sh win64
- name: Generate checksums
run: release/generate_checksums.sh
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: scrcpy-release-${{ env.VERSION }}
path: release-${{ env.VERSION }}
path: release/output