Skip to content

Commit

Permalink
split CI is several stages
Browse files Browse the repository at this point in the history
  • Loading branch information
rjodinchr committed Nov 29, 2024
1 parent a82f64a commit bdc141d
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,35 @@ jobs:
shell: bash
run: |
set -x
android_base=$(mktemp -d)
external=${android_base}/external
mkdir ${external}
echo "android=${{ github.workspace }}/android" >> $GITHUB_ENV
mkdir -p ${{ env.android }}/external
for repo in tests/*
do
name=$(basename ${repo})
git init ${external}/${name}
git -C ${external}/${name} remote add origin $(cat ${repo}/REPO)
git -C ${external}/${name} fetch --depth 1 origin $(cat ${repo}/VERSION)
git -C ${external}/${name} checkout $(cat ${repo}/VERSION)
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
ndk=android-ndk-r27c
ndk_zip=${ndk}-linux.zip
- name: Download NDK
shell: bash
run: |
set -x
echo "ndk=android-ndk-r27c" >> $GITHUB_ENV
ndk_zip=${{ env.ndk }}-linux.zip
wget https://dl.google.com/android/repository/${ndk_zip}
unzip -q ${ndk_zip}
cargo run -- ${android_base} $(pwd)/${ndk} all
- name: Run ninja-to-soong
shell: bash
run: |
set -x
cargo run -- $(realpath ${{ env.android }}) $(realpath $(pwd)/${{ env.ndk }}) all
- name: Check generated files
shell: bash
run: |
set -x
for repo in tests/*
do
name=$(basename ${repo})
diff ${repo}/Android.bp ${external}/${name}/Android.bp
diff ${repo}/Android.bp ${{ env.android }}/external/${name}/Android.bp
done

0 comments on commit bdc141d

Please sign in to comment.