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

Ci: Multiple actions update #477

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
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
89 changes: 45 additions & 44 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
build:

name: Build - ${{ matrix.job.name }}
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -40,17 +40,18 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install toolchain
uses: actions-rs/toolchain@v1
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: "1.70.0"
override: true
default: true
components: rustfmt
profile: minimal
target: ${{ matrix.job.target }}
targets: ${{ matrix.job.target }}
components: "rustfmt"

- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ matrix.job.os }}

- name: Build
uses: actions-rs/cargo@v1
Expand All @@ -63,7 +64,7 @@ jobs:
run: chmod -v a+x target/${{ matrix.job.target }}/release/*

- name: Publish Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binaries-linux-${{ matrix.job.name }}
path: |
Expand All @@ -74,14 +75,14 @@ jobs:

build-win:
name: Build - windows
runs-on: windows-2019
runs-on: windows-2022

steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install toolchain
- name: Install toolchain # Can't switch to "dtolnay/rust-toolchain", it will cause "Build UI setup file" error.
uses: actions-rs/toolchain@v1
with:
toolchain: "1.70.0"
Expand All @@ -90,13 +91,16 @@ jobs:
components: rustfmt
profile: minimal
target: x86_64-pc-windows-msvc

- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ matrix.job.os }}

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features --target=x86_64-pc-windows-msvc
use-cross: true

- name: Install NSIS
run: |
Expand All @@ -107,7 +111,7 @@ jobs:
scoop install nsis

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16

Expand Down Expand Up @@ -151,7 +155,7 @@ jobs:
recursive: false

- name: Publish Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binaries-windows-x86_64
path: |
Expand All @@ -168,7 +172,7 @@ jobs:
needs:
- build
- build-win
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -183,7 +187,7 @@ jobs:
steps:

- name: Download binaries (${{ matrix.job.os }} - ${{ matrix.job.name }})
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries-${{ matrix.job.os }}-${{ matrix.job.name }}
path: ${{ matrix.job.name }}
Expand All @@ -198,7 +202,7 @@ jobs:
zip ${{ matrix.job.name }}/rustdesk-server-${{ matrix.job.os }}-${{ matrix.job.name }}${{ matrix.job.suffix }}.zip ${{ matrix.job.name }}/*

- name: Create Release (${{ matrix.job.os }} - (${{ matrix.job.name }})
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
draft: true
files: ${{ matrix.job.name }}/rustdesk-server-${{ matrix.job.os }}-${{ matrix.job.name }}${{ matrix.job.suffix }}.zip
Expand All @@ -208,7 +212,7 @@ jobs:

name: Docker push - ${{ matrix.job.name }}
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -221,10 +225,10 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries-linux-${{ matrix.job.name }}
path: docker/rootfs/usr/bin
Expand All @@ -233,21 +237,21 @@ jobs:
run: chmod -v a+x docker/rootfs/usr/bin/*

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: registry.hub.docker.com/${{ secrets.DOCKER_IMAGE }}

Expand Down Expand Up @@ -279,13 +283,13 @@ jobs:

name: Docker manifest
needs: docker
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:

- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down Expand Up @@ -330,7 +334,7 @@ jobs:

name: Docker push - ${{ matrix.job.name }}
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -342,10 +346,10 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries-linux-${{ matrix.job.name }}
path: docker-classic/
Expand All @@ -354,21 +358,21 @@ jobs:
run: chmod -v a+x docker-classic/*

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: registry.hub.docker.com/${{ secrets.DOCKER_IMAGE_CLASSIC }}

Expand Down Expand Up @@ -398,13 +402,13 @@ jobs:

name: Docker manifest
needs: docker
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:

- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down Expand Up @@ -448,7 +452,7 @@ jobs:

name: debian package - ${{ matrix.job.name }}
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -461,10 +465,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: actions/checkout@v4

- name: Create packaging env
run: |
Expand All @@ -473,7 +474,7 @@ jobs:
mkdir -p debian-build/${{ matrix.job.name }}/bin

- name: Download binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries-linux-${{ matrix.job.name }}
path: debian-build/${{ matrix.job.name }}/bin
Expand All @@ -487,7 +488,7 @@ jobs:
debuild -i -us -uc -b -a${{ matrix.job.debian_platform }}

- name: Create Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
draft: true
files: |
Expand Down
Loading