mirror of
https://github.com/gopher64/gopher64.git
synced 2026-07-11 01:25:20 +02:00
5f84c18b39
* linux aarch * more * more * more * more * more * more * more * more * more * more * more
122 lines
3.4 KiB
YAML
122 lines
3.4 KiB
YAML
name: Rust
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
rustflags: ""
|
|
- name: Install SDL2
|
|
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
|
run: |
|
|
cat <<EOF > deb822sources
|
|
Types: deb
|
|
URIs: http://archive.ubuntu.com/ubuntu/
|
|
Suites: noble
|
|
Components: main restricted universe
|
|
Architectures: amd64
|
|
|
|
Types: deb
|
|
URIs: http://security.ubuntu.com/ubuntu/
|
|
Suites: noble-security
|
|
Components: main restricted universe
|
|
Architectures: amd64
|
|
|
|
Types: deb
|
|
URIs: http://archive.ubuntu.com/ubuntu/
|
|
Suites: noble-updates
|
|
Components: main restricted universe
|
|
Architectures: amd64
|
|
|
|
Types: deb
|
|
URIs: http://azure.ports.ubuntu.com/ubuntu-ports/
|
|
Suites: noble
|
|
Components: main restricted multiverse universe
|
|
Architectures: arm64
|
|
|
|
Types: deb
|
|
URIs: http://azure.ports.ubuntu.com/ubuntu-ports/
|
|
Suites: noble-updates
|
|
Components: main restricted multiverse universe
|
|
Architectures: arm64
|
|
EOF
|
|
|
|
sudo mv deb822sources /etc/apt/sources.list.d/ubuntu.sources
|
|
sudo dpkg --add-architecture arm64
|
|
sudo apt update
|
|
sudo apt -y install libsdl2-dev:arm64 g++-aarch64-linux-gnu
|
|
- name: Install SDL2
|
|
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
|
run: |
|
|
sudo apt update
|
|
sudo apt -y install libsdl2-dev
|
|
- name: Build
|
|
run: |
|
|
cargo build --release -v --target=${{ matrix.target }}
|
|
- name: Upload file
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: gopher64-${{ matrix.target }}
|
|
path: target/${{ matrix.target }}/release/gopher64
|
|
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
target: [x86_64-pc-windows-msvc]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
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 }}
|
|
- name: Upload file
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: gopher64-${{ matrix.target }}
|
|
path: target/${{ matrix.target }}/release/gopher64.exe
|
|
|
|
build-macos:
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
target: [x86_64-apple-darwin, aarch64-apple-darwin]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
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 }}
|
|
- name: Upload file
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: gopher64-${{ matrix.target }}
|
|
path: target/${{ matrix.target }}/release/gopher64
|