Skip to content

Commit

Permalink
Stablise Python Builds. (#4558)
Browse files Browse the repository at this point in the history
See the PR description or issue 4559 for context.
  • Loading branch information
davinchia committed Jul 6, 2021
1 parent a9bd334 commit c83b134
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 35 deletions.
25 changes: 4 additions & 21 deletions .github/workflows/publish-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
mode: start
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
ec2-image-id: ami-04bd6e81239f4f3fb
ec2-image-id: ami-0a5f6900e1cc7e07e
ec2-instance-type: c5.2xlarge
subnet-id: subnet-0469a9e68a379c1d3
security-group-id: sg-0793f3c9413f21970
Expand Down Expand Up @@ -64,26 +64,9 @@ jobs:
uses: actions/checkout@v2
with:
repository: ${{github.event.pull_request.head.repo.full_name}} # always use the branch's repository

# this intentionally does not use restore-keys so we don't mess with gradle caching
- name: Gradle and Python Caching
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
**/.venv
key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}

- uses: actions/setup-java@v1
with:
java-version: '14'
- uses: actions/setup-node@v1
with:
node-version: '14.7'
- uses: actions/setup-python@v2
with:
python-version: '3.7'
# Beside PyEnv, this does not set any runtimes up because it uses an AMI image that has everything pre-installed. See https://github.com/airbytehq/airbyte/issues/4559.
- name: Install Pyenv
run: python3 -m pip install virtualenv==16.7.9 --user
- name: Write Integration Test Credentials # TODO DRY this with test-command.yml
run: ./tools/bin/ci_credentials.sh
env:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
mode: start
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
ec2-image-id: ami-04bd6e81239f4f3fb
ec2-image-id: ami-0a5f6900e1cc7e07e
ec2-instance-type: c5.2xlarge
subnet-id: subnet-0469a9e68a379c1d3
security-group-id: sg-0793f3c9413f21970
Expand Down Expand Up @@ -62,15 +62,9 @@ jobs:
uses: actions/checkout@v2
with:
repository: ${{ github.event.inputs.repo }}
- uses: actions/setup-java@v1
with:
java-version: '14'
- uses: actions/setup-node@v1
with:
node-version: '14.7'
- uses: actions/setup-python@v2
with:
python-version: '3.7'
# Beside PyEnv, this does not set any runtimes up because it uses an AMI image that has everything pre-installed. See https://github.com/airbytehq/airbyte/issues/4559/
- name: Install Pyenv
run: python3 -m pip install virtualenv==16.7.9 --user
- name: Write Integration Test Credentials
run: ./tools/bin/ci_credentials.sh
env:
Expand Down
7 changes: 3 additions & 4 deletions tools/integrations/manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ cmd_build() {
[ -d "$path" ] || error "Path must be the root path of the integration"

local run_tests=$1; shift || run_tests=true
# TODO re-enable build cache if needed (https://github.com/airbytehq/airbyte/issues/4508)
echo "Building $path"
./gradlew --no-daemon -no-build-cache "$(_to_gradle_path "$path" clean)"
./gradlew --no-daemon -no-build-cache "$(_to_gradle_path "$path" build)"
./gradlew --no-daemon "$(_to_gradle_path "$path" clean)"
./gradlew --no-daemon "$(_to_gradle_path "$path" build)"

if [ "$run_tests" = false ] ; then
echo "Skipping integration tests..."
else
echo "Running integration tests..."
./gradlew --no-daemon --no-build-cache "$(_to_gradle_path "$path" integrationTest)"
./gradlew --no-daemon "$(_to_gradle_path "$path" integrationTest)"
fi
}

Expand Down

0 comments on commit c83b134

Please sign in to comment.