Make all annotation processors derive from ProcessorBase #3371
Workflow file for this run
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: General CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9.16' | |
- name: Gradle caches | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: caches-${{ runner.os }}-${{ hashFiles('**/*.gradle') }} | |
- name: Gradle wrapper caches | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/wrapper | |
key: wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Fetch buck | |
run: | | |
(rm -rf buck && mkdir buck && \ | |
wget https://jitpack.io/com/github/facebook/buck/v2022.05.05.01/buck-v2022.05.05.01-java11.pex && \ | |
mv buck-v2022.05.05.01-java11.pex buck/buck && \ | |
chmod +x buck/buck && \ | |
ls -l buck) | |
- name: Build everything | |
run: BUCK_PATH=`realpath buck/buck` ./gradlew assemble --stacktrace --no-daemon | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9.16' | |
- name: Gradle caches | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: caches-${{ runner.os }}-${{ hashFiles('**/*.gradle') }} | |
- name: Gradle wrapper caches | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/wrapper | |
key: wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Fetch buck | |
run: | | |
(rm -rf buck && mkdir buck && \ | |
wget https://jitpack.io/com/github/facebook/buck/v2022.05.05.01/buck-v2022.05.05.01-java11.pex && \ | |
mv buck-v2022.05.05.01-java11.pex buck/buck && \ | |
chmod +x buck/buck && \ | |
ls -l buck) | |
- name: Run tests | |
run: BUCK_PATH=`realpath buck/buck` ./gradlew test -x :litho-intellij-plugin:test --stacktrace --no-daemon | |
plugin-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9.16' | |
- name: Gradle caches | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: caches-${{ runner.os }}-${{ hashFiles('**/*.gradle') }} | |
- name: Gradle wrapper caches | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/wrapper | |
key: wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Fetch buck | |
run: | | |
(rm -rf buck && mkdir buck && \ | |
wget https://jitpack.io/com/github/facebook/buck/v2022.05.05.01/buck-v2022.05.05.01-java11.pex && \ | |
mv buck-v2022.05.05.01-java11.pex buck/buck && \ | |
chmod +x buck/buck && \ | |
ls -l buck) | |
- name: Run IntelliJ Plugin tests | |
run: BUCK_PATH=`realpath buck/buck` ./gradlew :litho-intellij-plugin:test --stacktrace --no-daemon | |
deploy-check: | |
name: Skip deploy if PR or Fork or not a SNAPSHOT version | |
needs: [build, tests] | |
if: ${{ github.event_name != 'pull_request' && github.repository == 'facebook/litho' }} | |
runs-on: ubuntu-latest | |
outputs: | |
is-snapshot: ${{ steps.check_snapshot.outputs.IS_SNAPSHOT != '' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Check if SNAPSHOT version | |
id: check_snapshot | |
run: | | |
echo ::set-output name=IS_SNAPSHOT::`grep 'VERSION_NAME=[0-9\.]\+-SNAPSHOT' gradle.properties)` | |
deploy: | |
needs: [deploy-check] | |
if: ${{ needs.deploy-check.outputs.is-snapshot == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9.16' | |
- name: Gradle caches | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: caches-${{ runner.os }}-${{ hashFiles('**/*.gradle') }} | |
- name: Gradle wrapper caches | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/wrapper | |
key: wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Fetch buck | |
run: | | |
(rm -rf buck && mkdir buck && \ | |
wget https://jitpack.io/com/github/facebook/buck/v2022.05.05.01/buck-v2022.05.05.01-java11.pex && \ | |
mv buck-v2022.05.05.01-java11.pex buck/buck && \ | |
chmod +x buck/buck && \ | |
ls -l buck) | |
- name: Publish Snapshot | |
run: BUCK_PATH=`realpath buck/buck` ./gradlew uploadArchives --stacktrace |