Update dependencies #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: android | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: {} | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 1 | |
submodules: true | |
- name: Configure packaging name for git master branch | |
if: ${{ github.ref == 'refs/heads/master' }} | |
run: | | |
echo "release_name=preview" >> $GITHUB_ENV | |
- name: Configure packaging name for tag | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
echo "release_name=`basename $GITHUB_REF`" >> $GITHUB_ENV | |
- name: Exit otherwise | |
if: ${{ !(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) || | |
github.repository_owner != 'supertuxkart' }} | |
run: exit 1 | |
- name: Check for prerelease | |
if: ${{ github.ref == 'refs/heads/master' || contains(github.ref, 'rc') || contains(github.ref, 'beta') }} | |
run: | | |
echo "release_pre=true" >> $GITHUB_ENV | |
- name: Check for non-prerelease | |
if: ${{ github.ref != 'refs/heads/master' && !contains(github.ref, 'rc') && !contains(github.ref, 'beta') }} | |
run: | | |
echo "release_pre=false" >> $GITHUB_ENV | |
- name: Restore timestamps | |
run: | | |
cd src | |
for dir in * | |
do | |
cd $dir | |
last_time=$(git log --date=local --pretty=format:"%cd" . | head -1) | |
find . -exec touch -d "$last_time" {} + | |
cd .. | |
done | |
- name: Fetch shaderc external deps | |
run: | | |
cd src/shaderc | |
utils/git-sync-deps | |
for dir in "third_party/"* | |
do | |
rm -rf "$dir"/.git 2>/dev/null || : | |
done | |
- name: Archive | |
run: | | |
cd src | |
tar --exclude-vcs -cJvf ../dependencies-android-src.tar.xz --exclude=libvpx --exclude=libopenglrecorder --exclude=sqlite --exclude=libsamplerate --exclude=bluez --exclude=wayland . | |
- name: Upload android deps | |
uses: ncipollo/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: "dependencies-android-src.tar.xz" | |
tag: ${{ env.release_name }} | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
allowUpdates: true | |
prerelease: ${{ env.release_pre }} |