1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-12-18 02:15:19 +00:00

Make some changes to README and CI config[ci skip]

Change links to nightly builds in README.

Change the version of nightly builds (use the build number at the end of the version string for master and part of the commit hash for other branches). Make it so that the workflow can be run manually. Disable cache saving for non-master branches, because in this case the cache is always created new and doesn't update the existing one, which wastes cache space. Temporarily disable build for Android
This commit is contained in:
biroder 2023-11-11 00:38:47 +02:00
parent 10e4d3efff
commit 46710dd31a
2 changed files with 54 additions and 30 deletions

View file

@ -2,22 +2,28 @@ name: CI
on: on:
push: push:
branches: branches-ignore:
- master - cpp-rewrite
- horizon-os
paths-ignore: paths-ignore:
- '.gitignore' - '.gitignore'
- '**.md' - '**.md'
- 'LICENSE' - 'LICENSE'
- 'drshorizon/**' - 'drshorizon/**'
- 'res/**' - 'res/**'
workflow_dispatch:
defaults:
run:
shell: bash
env:
VERSION: "0.101.0"
jobs: jobs:
build: build:
name: ${{ matrix.name }} name: ${{ matrix.name }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy: strategy:
fail-fast: true fail-fast: true
matrix: matrix:
@ -57,8 +63,8 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt install libasound2-dev libudev-dev libgl1-mesa-dev pkg-config run: sudo apt install libasound2-dev libudev-dev libgl1-mesa-dev pkg-config
- name: Set up cache - name: Restore cache
uses: actions/cache@v3 uses: actions/cache/restore@v3
with: with:
path: | path: |
~/.cargo ~/.cargo
@ -82,8 +88,10 @@ jobs:
run: | run: |
if [ "${{ github.ref_type }}" == "tag" ]; then if [ "${{ github.ref_type }}" == "tag" ]; then
export DRS_BUILD_VERSION_OVERRIDE="{{ github.ref_name }}" export DRS_BUILD_VERSION_OVERRIDE="{{ github.ref_name }}"
elif [ "${{ github.ref_name }} == "master"]; then
export DRS_BUILD_VERSION_OVERRIDE="$VERSION-$((${{ github.run_number }} + 654))"
else else
export DRS_BUILD_VERSION_OVERRIDE="0.101.0-$((${{ github.run_number }} + 654))-${{ github.ref_name }}" export DRS_BUILD_VERSION_OVERRIDE="$VERSION-${GITHUB_SHA:0:7}"
fi fi
mkdir release mkdir release
@ -108,22 +116,28 @@ jobs:
path: ./release/* path: ./release/*
if-no-files-found: error if-no-files-found: error
- name: Save cache
if: ${{ github.ref_name == 'master' || github.ref_type == 'tag' }}
uses: actions/cache/save@v3
with:
path: |
~/.cargo
~/.rustup
target
key: ${{ matrix.target_name }}-cargo
build_android: build_android:
name: Android build name: Android build
if: false
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
ANDROID_SIGNING_KEYSTORE: "${{ secrets.ANDROID_SIGNING_KEYSTORE }}"
APP_OUTPUTS_DIR: "app/app/build/outputs/apk/release" APP_OUTPUTS_DIR: "app/app/build/outputs/apk/release"
defaults:
run:
shell: bash
strategy: strategy:
fail-fast: true fail-fast: true
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Restore cache
- name: Set up cache uses: actions/cache/restore@v3
uses: actions/cache@v3
with: with:
path: | path: |
~/.cache ~/.cache
@ -147,8 +161,10 @@ jobs:
run: | run: |
if [ "${{ github.ref_type }}" == "tag" ]; then if [ "${{ github.ref_type }}" == "tag" ]; then
export DRS_BUILD_VERSION_OVERRIDE="{{ github.ref_name }}" export DRS_BUILD_VERSION_OVERRIDE="{{ github.ref_name }}"
elif [ "${{ github.ref_name }} == "master"]; then
export DRS_BUILD_VERSION_OVERRIDE="$VERSION-$((${{ github.run_number }} + 654))"
else else
export DRS_BUILD_VERSION_OVERRIDE="0.101.0-$((${{ github.run_number }} + 654))-${{ github.ref_name }}" export DRS_BUILD_VERSION_OVERRIDE="$VERSION-${GITHUB_SHA:0:7}"
fi fi
cd app cd app
@ -157,12 +173,10 @@ jobs:
./gradlew assembleRelease ./gradlew assembleRelease
- name: Sign app - name: Sign app
if: ${{ env.ANDROID_SIGNING_KEYSTORE != '' }}
run: | run: |
BUILD_TOOLS=$ANDROID_HOME/build-tools/33.0.0 BUILD_TOOLS=$ANDROID_HOME/build-tools/33.0.0
echo "${{ secrets.ANDROID_SIGNING_KEYSTORE }}" | base64 --decode > keystore.jks echo "${{ secrets.ANDROID_SIGNING_KEYSTORE }}" | base64 --decode > keystore.jks
$BUILD_TOOLS/zipalign -c -v 4 $APP_OUTPUTS_DIR/app-release-unsigned.apk
if [ "${{ secrets.ANDROID_SIGNING_KEY_PASS }}" != "" ]; then if [ "${{ secrets.ANDROID_SIGNING_KEY_PASS }}" != "" ]; then
$BUILD_TOOLS/apksigner sign --ks ./keystore.jks --ks-key-alias "${{ secrets.ANDROID_SIGNING_ALIAS }}" --ks-pass "pass:${{ secrets.ANDROID_SIGNING_KEYSTORE_PASS }}" --key-pass "pass:${{ secrets.ANDROID_SIGNING_KEY_PASS }}" --out $APP_OUTPUTS_DIR/app-signed.apk $APP_OUTPUTS_DIR/app-release-unsigned.apk $BUILD_TOOLS/apksigner sign --ks ./keystore.jks --ks-key-alias "${{ secrets.ANDROID_SIGNING_ALIAS }}" --ks-pass "pass:${{ secrets.ANDROID_SIGNING_KEYSTORE_PASS }}" --key-pass "pass:${{ secrets.ANDROID_SIGNING_KEY_PASS }}" --out $APP_OUTPUTS_DIR/app-signed.apk $APP_OUTPUTS_DIR/app-release-unsigned.apk
else else
@ -174,11 +188,7 @@ jobs:
- name: Prepare artifact - name: Prepare artifact
run: | run: |
mkdir release mkdir release
if [ "${{ env.ANDROID_SIGNING_KEYSTORE }}" != "" ]; then mv $APP_OUTPUTS_DIR/app-signed.apk release/doukutsu-rs.apk
mv $APP_OUTPUTS_DIR/app-signed.apk release/doukutsu-rs.apk
else
cp $APP_OUTPUTS_DIR/app-release-unsigned.apk release/doukutsu-rs.apk
fi
cp LICENSE ./release cp LICENSE ./release
- name: Upload artifact - name: Upload artifact
@ -187,3 +197,17 @@ jobs:
name: doukutsu-rs_android name: doukutsu-rs_android
path: ./release/* path: ./release/*
if-no-files-found: error if-no-files-found: error
- name: Save cache
if: ${{ github.ref_name == 'master' || github.ref_type == 'tag' }}
uses: actions/cache/save@v3
with:
path: |
~/.cache
~/.cargo
~/.rustup
~/.gradle
app/app/.cxx
app/app/build
drsandroid/target
key: android-cargo

View file

@ -5,17 +5,17 @@ in [Rust](https://www.rust-lang.org/).
[Join the Discord server](https://discord.gg/fbRsNNB) [Join the Discord server](https://discord.gg/fbRsNNB)
![https://ci.appveyor.com/api/projects/status/github/doukutsu-rs/doukutsu-rs](https://ci.appveyor.com/api/projects/status/github/doukutsu-rs/doukutsu-rs) ![CI](https://github.com/doukutsu-rs/doukutsu-rs/actions/workflows/ci.yml/badge.svg)
- [Get nightly builds from AppVeyor](https://ci.appveyor.com/project/alula/doukutsu-rs) (recommended for now, has latest fixes and improvements) - [Get nightly builds](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master?preview) (recommended for now, has latest fixes and improvements)
Permalinks to latest builds from `master` branch: Permalinks to latest builds from `master` branch:
- [Windows (64-bit)](https://ci.appveyor.com/api/projects/alula/doukutsu-rs/artifacts/doukutsu-rs_win64.zip?branch=master&job=windows-x64) - [Windows (64-bit)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_windows-x64.zip)
- [Windows (32-bit)](https://ci.appveyor.com/api/projects/alula/doukutsu-rs/artifacts/doukutsu-rs_win32.zip?branch=master&job=windows-x32) - [Windows (32-bit)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_windows-x32.zip)
- [macOS (Intel, 64-bit, 10.14+)](https://ci.appveyor.com/api/projects/alula/doukutsu-rs/artifacts/doukutsu-rs_mac-intel.zip?branch=master&job=mac-x64) - [macOS (Intel, 64-bit, 10.14+)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_mac-x64.zip)
- [macOS (Apple M1, 11.0+)](https://ci.appveyor.com/api/projects/alula/doukutsu-rs/artifacts/doukutsu-rs_mac-m1.zip?branch=master&job=mac-arm64) - [macOS (Apple M1, 11.0+)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_mac-arm64.zip)
- [Linux (64-bit)](https://ci.appveyor.com/api/projects/alula/doukutsu-rs/artifacts/doukutsu-rs_linux.zip?branch=master&job=linux-x64) - [Linux (64-bit)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_linux-x64.zip)
**macOS note:** If you get a `"doukutsu-rs" can't be opened` message, right-click doukutsu-rs.app and click open. **macOS note:** If you get a `"doukutsu-rs" can't be opened` message, right-click doukutsu-rs.app and click open.