Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: upgrade workflows from ubuntu-20.04 to ubuntu-22.04 where possible #463

Merged
merged 17 commits into from
Jan 16, 2023
Merged
76 changes: 44 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ jobs:
show-github-context:
name: "Show Github Context"
timeout-minutes: 1
runs-on: ubuntu-20.04
runs-on:
- ubuntu-22.04
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
steps:
- run: echo $GITHUB_CONTEXT

test-jvm:
name: "Test JVM Code"
runs-on: ubuntu-20.04
runs-on:
- ubuntu-22.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
Expand All @@ -40,13 +42,15 @@ jobs:
distribution: 'adopt'
java-version: 17
cache: 'sbt'
- name: Misc. Setup
run: |
sudo snap install task --classic
sudo sysctl -w vm.max_map_count=262144
- uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Increase MMAP Limits
run: sudo sysctl -w vm.max_map_count=262144
- name: Compile
run: |
sbt update compile Test/compile elasticsearchPluginBundle
run: task jvmCompile
- name: Assemble
run: task jvmAssemble
- name: Run Unit Tests
run: task jvmUnitTestQuick
- name: Run Cluster
Expand All @@ -62,7 +66,8 @@ jobs:

test-python:
name: Test Python Code
runs-on: ubuntu-20.04
runs-on:
- ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
Expand All @@ -78,14 +83,15 @@ jobs:
distribution: 'adopt'
java-version: 17
cache: 'sbt'
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.7.5'
python-version: '3.7.15'
cache: 'pip'
- name: Misc. Setup
run: |
sudo snap install task --classic
sudo sysctl -w vm.max_map_count=262144
- uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Increase MMAP Limits
run: sudo sysctl -w vm.max_map_count=262144
- name: Docs
run: task pyDocs
- name: Run Cluster
Expand All @@ -101,7 +107,9 @@ jobs:

test-benchmarks:
name: Test Benchmarks
runs-on: ubuntu-20.04
runs-on:
# Has to remain on ubuntu 20 and python 3.6 until ann-benchmarks is upgraded.
- ubuntu-20.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
Expand All @@ -117,14 +125,15 @@ jobs:
distribution: 'adopt'
java-version: 17
cache: 'sbt'
- uses: actions/setup-python@v2
- uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v4
with:
python-version: '3.6'
cache: 'pip'
- name: Misc. Setup
run: |
sudo snap install task --classic
sudo sysctl -w vm.max_map_count=262144
- name: Increase MMAP Limits
run: sudo sysctl -w vm.max_map_count=262144
- name: Initialize Submodule
run: task annbCreateSubmodule
- name: Install Dependencies
Expand All @@ -142,13 +151,14 @@ jobs:

build-jekyll-site:
name: Test Jekyll Site
runs-on: ubuntu-20.04
runs-on:
- ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Misc. Setup
run: |
sudo snap install task --classic
- uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compile Jekyll Site
run: |
sudo chown -R runneradmin:runneradmin docs
Expand All @@ -158,7 +168,8 @@ jobs:

publish-snapshots:
name: Publish Snapshots
runs-on: ubuntu-20.04
runs-on:
- ubuntu-22.04
timeout-minutes: 10
needs: [show-github-context, test-jvm, test-python, test-benchmarks]
steps:
Expand All @@ -181,14 +192,15 @@ jobs:
distribution: 'adopt'
java-version: 17
cache: 'sbt'
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.7.5'
python-version: '3.7.15'
cache: 'pip'
- name: Misc. Setup
run: |
sudo snap install task --classic
python3 -m pip install setuptools
- uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Setuptools
run: python3 -m pip install setuptools
- name: Publish to PyPi
run: task pyPublishSnapshot VERSION=$(cat version)-dev${{ github.run_number }}
if: github.event_name == 'pull_request'
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ permissions:

jobs:
release-docs:
runs-on: ubuntu-20.04
runs-on:
- ubuntu-22.04
timeout-minutes: 10
environment:
name: github-pages
Expand All @@ -25,9 +26,9 @@ jobs:
with:
python-version: '3.7.5'
cache: 'pip'
- name: Misc. Setup
run: |
sudo snap install task --classic
- uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Jekyll Site
run: |
sudo chown -R runneradmin:runneradmin docs
Expand All @@ -49,7 +50,8 @@ jobs:
uses: actions/deploy-pages@v1

release:
runs-on: ubuntu-20.04
runs-on:
- ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
Expand All @@ -71,13 +73,15 @@ jobs:
distribution: 'adopt'
java-version: 17
cache: 'sbt'
- uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Release Credentials
env:
PYPIRC_B64: ${{ secrets.PYPIRC_B64 }}
run: ./.github/scripts/setup-env.sh
- run: |
sudo snap install task --classic
python3 -m pip install setuptools
- name: Setup Setuptools
run: python3 -m pip install setuptools
- name: Publish to PyPi
run: task pyPublishRelease
- name: Publish to Github
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ tasks:
jvmCompile:
desc: Compile Scala and Java code using SBT
cmds:
- sbt -client ";compile;Test/compile"
- sbt -client "compile; Test/compile; IntegrationTest/compile"

jvmAssemble:
desc: Build the plugin bundle using SBT
Expand Down