ci: run unittest when push #1
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: Build Android Release | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Run tcx test | |
runs-on: macos-12 | |
steps: | |
- name: Get the latest commit SHA | |
id: sha | |
uses: actions/github-script@v6 | |
with: | |
result-encoding: string | |
script: | | |
const { owner, repo, number } = context.issue | |
const pr = await github.rest.pulls.get({ | |
owner, | |
repo, | |
pull_number: number, | |
}) | |
return pr.data.head.sha | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ steps.sha.outputs.result }} | |
fetch-depth: 5 | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
~/.rustup | |
target | |
key: ${{ runner.os }}-nightly | |
- name: Install Rust | |
run: | | |
rustup toolchain install nightly-2022-10-31 | |
rustup default nightly-2022-10-31-x86_64-apple-darwin | |
rustup show | |
- name: Install dependency | |
run: | | |
brew install protobuf | |
- name: Build TCX And IKC | |
run: | | |
make test-tcx: |