2020-04-30 17:53:15 +01:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
2020-04-30 18:26:07 +01:00
|
|
|
build-linux:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout 🛎️
|
|
|
|
uses: actions/checkout@v2
|
2020-05-12 05:51:20 +01:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2020-04-30 18:26:07 +01:00
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: |
|
|
|
|
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
|
|
|
|
sudo apt-get update -y -qq
|
|
|
|
sudo apt-get install libsdl2-dev
|
|
|
|
sudo apt-get install libsdl2-image-dev
|
|
|
|
|
2020-04-30 18:39:06 +01:00
|
|
|
- name: Cache cargo registry
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.cargo/registry
|
|
|
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Cache cargo index
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.cargo/git
|
|
|
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Cache cargo build
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
|
2020-04-30 18:26:07 +01:00
|
|
|
- name: Build
|
|
|
|
run: cargo build --release --manifest-path platform/rustboyadvance-sdl2/Cargo.toml
|
|
|
|
|
|
|
|
- name: Collect artifacts
|
|
|
|
run: |
|
|
|
|
mkdir artifacts
|
|
|
|
mkdir artifacts/assets
|
|
|
|
cp README.md artifacts
|
|
|
|
cp LICENSE artifacts
|
|
|
|
cp ./assets/icon_cropped_small.png artifacts/assets
|
|
|
|
cp ./target/release/rustboyadvance-sdl2 artifacts
|
|
|
|
|
|
|
|
- name : Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: rustboyadvance-sdl2-x86_64-unknown-linux-gnu
|
|
|
|
path: artifacts
|
|
|
|
|
2020-10-19 23:31:01 +01:00
|
|
|
build-android-apk:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout 🛎️
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Install toolchains
|
|
|
|
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android
|
|
|
|
- name: Build APK
|
|
|
|
working-directory: ./platform/android
|
|
|
|
run: ./gradlew build
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: rustdroid.apk
|
|
|
|
path: ./platform/android/app/build/outputs/apk/release/app-release-unsigned.apk
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-30 17:53:15 +01:00
|
|
|
build-windows-64:
|
|
|
|
|
|
|
|
runs-on: windows-2019
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout 🛎️
|
|
|
|
uses: actions/checkout@v2
|
2020-05-12 05:51:20 +01:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2020-04-30 17:53:15 +01:00
|
|
|
|
2020-04-30 18:26:07 +01:00
|
|
|
- run: rustup target add x86_64-pc-windows-msvc
|
|
|
|
|
2020-04-30 18:39:06 +01:00
|
|
|
- name: Cache cargo registry
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.cargo/registry
|
|
|
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Cache cargo index
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.cargo/git
|
|
|
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Cache cargo build
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
|
2020-04-30 17:53:15 +01:00
|
|
|
- name: Build
|
2020-04-30 18:26:07 +01:00
|
|
|
run: cargo build --target x86_64-pc-windows-msvc --release --manifest-path .\platform\rustboyadvance-sdl2\Cargo.toml
|
2020-04-30 17:53:15 +01:00
|
|
|
|
|
|
|
- name: Collect artifacts
|
|
|
|
run: |
|
|
|
|
mkdir artifacts
|
|
|
|
mkdir artifacts\assets
|
|
|
|
copy README.md artifacts
|
|
|
|
copy LICENSE artifacts
|
|
|
|
copy .\assets\icon_cropped_small.png artifacts\assets
|
2020-04-30 18:48:11 +01:00
|
|
|
copy .\target\x86_64-pc-windows-msvc\release\rustboyadvance-sdl2.exe artifacts
|
2020-04-30 17:53:15 +01:00
|
|
|
copy .\platform\rustboyadvance-sdl2\msvc\64\*.dll artifacts
|
|
|
|
copy .\platform\rustboyadvance-sdl2\msvc\64\LICENSE.* artifacts
|
|
|
|
|
2020-04-30 18:26:07 +01:00
|
|
|
- name : Upload artifacts
|
2020-04-30 17:53:15 +01:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-04-30 18:26:07 +01:00
|
|
|
name: rustboyadvance-sdl2-x86_64-pc-windows-msvc
|
2020-04-30 17:53:15 +01:00
|
|
|
path: artifacts
|
|
|
|
|