Skip to content

Commit

Permalink
Separate protos job (mlflow#6399)
Browse files Browse the repository at this point in the history
* Separate protos job

Signed-off-by: harupy <[email protected]>

* test

Signed-off-by: harupy <[email protected]>

* Add paths

Signed-off-by: harupy <[email protected]>

* Revert "test"

This reverts commit 5d04b02.

Signed-off-by: harupy <[email protected]>
  • Loading branch information
harupy authored Aug 4, 2022
1 parent 29f8b2a commit be1a5ac
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 25 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,31 +162,6 @@ jobs:
cd mlflow/java
mvn clean package -q
protos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.inputs.repository }}
ref: ${{ github.event.inputs.ref }}
submodules: recursive
- name: Test building Docker image
working-directory: dev
env:
DOCKER_BUILDKIT: 1
run: |
docker build -t gen-protos -f Dockerfile.protos .
docker run --rm gen-protos protoc --version
- name: Install dependencies
run: |
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip -O $HOME/protoc.zip
sudo unzip $HOME/protoc.zip -d /tmp/protoc
sudo chmod -R 777 /tmp/protoc
echo "/tmp/protoc/bin" >> $GITHUB_PATH
- name: Run tests
run: |
./dev/test-generate-protos.sh
flavors:
runs-on: ubuntu-latest
steps:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/protos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Protos

on:
pull_request:
paths:
- mlflow/protos/**
push:
branches:
- master
- branch-[0-9]+.[0-9]+

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}

jobs:
protos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.inputs.repository }}
ref: ${{ github.event.inputs.ref }}
submodules: recursive
- name: Test building Docker image
working-directory: dev
env:
DOCKER_BUILDKIT: 1
run: |
docker build -t gen-protos -f Dockerfile.protos .
docker run --rm gen-protos protoc --version
- name: Install dependencies
run: |
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip -O $HOME/protoc.zip
sudo unzip $HOME/protoc.zip -d /tmp/protoc
sudo chmod -R 777 /tmp/protoc
echo "/tmp/protoc/bin" >> $GITHUB_PATH
- name: Run tests
run: |
./dev/test-generate-protos.sh

0 comments on commit be1a5ac

Please sign in to comment.