mirror of
https://github.com/gopher64/gopher64.git
synced 2026-10-02 09:15:31 +02:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
153 lines
5.3 KiB
YAML
153 lines
5.3 KiB
YAML
name: Rust
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
tags:
|
|
- "v*"
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build-linux:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-24.04
|
|
target: x86_64-unknown-linux-gnu
|
|
arch: linux-x86_64
|
|
llvm: X64
|
|
- os: ubuntu-24.04-arm
|
|
target: aarch64-unknown-linux-gnu
|
|
arch: linux-aarch64
|
|
llvm: ARM64
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
rustflags: ""
|
|
- name: Set LLVM_VERSION
|
|
run: echo "LLVM_VERSION=$(rustc --version --verbose | grep "LLVM version" | cut -d':' -f2 | xargs)" >> $GITHUB_ENV
|
|
- name: Install SDL Dependencies
|
|
# https://wiki.libsdl.org/SDL3/README-linux#build-dependencies
|
|
uses: awalsh128/cache-apt-pkgs-action@v1
|
|
with:
|
|
packages: build-essential git make \
|
|
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
|
|
libaudio-dev libjack-dev libsndio-dev libx11-dev libxext-dev \
|
|
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \
|
|
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
|
|
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev \
|
|
libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev
|
|
version: ${{ matrix.target }}-1.0
|
|
- name: Install LLVM and Clang
|
|
uses: KyleMayes/install-llvm-action@v2
|
|
with:
|
|
version: ${{ env.LLVM_VERSION }}
|
|
force-url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ env.LLVM_VERSION }}/LLVM-${{ env.LLVM_VERSION }}-Linux-${{ matrix.llvm }}.tar.xz
|
|
- name: Build
|
|
run: |
|
|
cargo build --release -v --target=${{ matrix.target }}
|
|
mkdir output
|
|
cp target/${{ matrix.target }}/release/gopher64 output/gopher64-${{ matrix.arch }}
|
|
- name: Upload file
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: gopher64-${{ matrix.arch }}
|
|
path: output/gopher64-${{ matrix.arch }}
|
|
|
|
build-windows:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-2025
|
|
target: x86_64-pc-windows-msvc
|
|
arch: windows-x86_64
|
|
llvm: win64
|
|
#- os: windows-11-arm
|
|
# target: aarch64-pc-windows-msvc
|
|
# arch: windows-aarch64
|
|
# llvm: woa64
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
rustflags: ""
|
|
- name: Set LLVM_VERSION
|
|
run: |
|
|
$llvm_version = rustc --version --verbose | Select-String "LLVM version" | ForEach-Object { $_.Line.Split(":")[1].Trim() }
|
|
echo "LLVM_VERSION=$llvm_version" >> $env:GITHUB_ENV
|
|
- name: Install LLVM and Clang
|
|
uses: KyleMayes/install-llvm-action@v2
|
|
with:
|
|
version: ${{ env.LLVM_VERSION }}
|
|
force-url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ env.LLVM_VERSION }}/LLVM-${{ env.LLVM_VERSION }}-${{ matrix.llvm }}.exe
|
|
- name: Build
|
|
run: |
|
|
cargo build --release -v --target=${{ matrix.target }}
|
|
mkdir output
|
|
cp target/${{ matrix.target }}/release/gopher64.exe output/gopher64-${{ matrix.arch }}.exe
|
|
- name: Upload unsigned artifact
|
|
id: upload-unsigned-artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: gopher64-${{ matrix.arch }}
|
|
path: output/gopher64-${{ matrix.arch }}.exe
|
|
- name: SignPath
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
uses: signpath/github-action-submit-signing-request@v1.3
|
|
with:
|
|
api-token: "${{ secrets.SIGNPATH_API_TOKEN }}"
|
|
organization-id: "${{ secrets.SIGNPATH_ORG_ID }}"
|
|
project-slug: "gopher64"
|
|
artifact-configuration-slug: "gopher64-${{ matrix.arch }}"
|
|
signing-policy-slug: "release-signing"
|
|
github-artifact-id: "${{ steps.upload-unsigned-artifact.outputs.artifact-id }}"
|
|
wait-for-completion: false
|
|
|
|
build-macos:
|
|
runs-on: macos-15
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- target: x86_64-apple-darwin
|
|
arch: mac-x86_64
|
|
- target: aarch64-apple-darwin
|
|
arch: mac-aarch64
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
rustflags: ""
|
|
- name: Build
|
|
run: |
|
|
cargo build --release -v --target=${{ matrix.target }}
|
|
mkdir output
|
|
cp target/${{ matrix.target }}/release/gopher64 output/gopher64-${{ matrix.arch }}
|
|
env:
|
|
AR: ar
|
|
- name: Upload file
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: gopher64-${{ matrix.arch }}
|
|
path: output/gopher64-${{ matrix.arch }}
|