Skip to content

Commit 52eb48b

Browse files
committed
Add CI pull.yml and trunk.yml
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 8b44cb0 commit 52eb48b

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.github/workflows/pull.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: pull
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
unittest-linux:
16+
name: unittest-linux
17+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
18+
strategy:
19+
fail-fast: false
20+
with:
21+
runner: linux.4xlarge
22+
docker-image: executorch-ubuntu-22.04-clang12
23+
submodules: 'true'
24+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
25+
timeout: 90
26+
script: |
27+
cmake -DTOKENIZERS_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Debug . -Bbuild
28+
cmake --build build -j9 --config Debug
29+
30+
# Run unit tests
31+
RESOURCES_PATH=test/resources build/sentencepiece_test

.github/workflows/trunk.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: pull
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- ciflow/trunk/*
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
unittest-macos:
17+
name: unittest-macos
18+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
19+
strategy:
20+
fail-fast: false
21+
with:
22+
runner: macos-m1-stable
23+
python-version: '3.11'
24+
submodules: 'true'
25+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
26+
timeout: 90
27+
script: |
28+
cmake -DTOKENIZERS_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Debug . -Bbuild
29+
cmake --build build -j9 --config Debug
30+
31+
# Run unit tests
32+
RESOURCES_PATH=test/resources build/sentencepiece_test

0 commit comments

Comments
 (0)