Skip to content

minor clean in main.rs #70

minor clean in main.rs

minor clean in main.rs #70

Workflow file for this run

name: Presubmit
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Generate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ninja
uses: ./.github/actions/setup-ninja
- name: Setup environement variables
shell: bash
run: |
set -x
echo "android=${{ github.workspace }}/android" >> $GITHUB_ENV
echo "ndk=android-ndk-r27c" >> $GITHUB_ENV
- name: Checkout repositories
shell: bash
run: |
set -x
mkdir -p ${{ env.android }}/external
for repo in tests/*
do
name=$(basename ${repo})
git init ${{ env.android }}/external/${name}
git -C ${{ env.android }}/external/${name} remote add origin $(cat ${repo}/REPO)
git -C ${{ env.android }}/external/${name} fetch --depth 1 origin $(cat ${repo}/VERSION)
git -C ${{ env.android }}/external/${name} checkout $(cat ${repo}/VERSION)
done
- name: Download NDK
shell: bash
run: |
set -x
ndk_zip=${{ env.ndk }}-linux.zip
wget -q https://dl.google.com/android/repository/${ndk_zip}
unzip -q ${ndk_zip}
- name: Run ninja-to-soong
shell: bash
env:
NINJA_TO_SOONG_SKIP_CMAKE_BUILD: 1
run: |
set -x
cargo run -- $(realpath ${{ env.android }}) $(realpath ${{ env.ndk }})
- name: Check generated files
shell: bash
run: |
set -x
git diff --exit-code
- name: Check format
shell: bash
run: |
set -x
find -name *.rs -exec rustfmt {} \+
git diff --exit-code