Skip to content

Commit 86529cb

Browse files
authored
Create test.yml
1 parent fc72ab4 commit 86529cb

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/test.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# mostly copied from https://raw.githubusercontent.com/web-infra-dev/oxc/main/.github/workflows/release_cli.yml
2+
name: release
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
permissions:
8+
contents: read
9+
id-token: write
10+
jobs:
11+
build:
12+
strategy:
13+
matrix:
14+
include:
15+
- os: windows-latest
16+
target: x86_64-pc-windows-msvc
17+
code-target: win32-x64
18+
19+
- os: windows-latest
20+
target: aarch64-pc-windows-msvc
21+
code-target: win32-arm64
22+
23+
- os: ubuntu-latest
24+
target: x86_64-unknown-linux-gnu
25+
code-target: linux-x64
26+
27+
- os: ubuntu-20.04
28+
target: aarch64-unknown-linux-gnu
29+
code-target: linux-arm64
30+
31+
- os: macos-latest
32+
target: x86_64-apple-darwin
33+
code-target: darwin-x64
34+
35+
- os: macos-latest
36+
target: aarch64-apple-darwin
37+
code-target: darwin-arm64
38+
39+
name: Build & Test on ${{ matrix.code-target }}
40+
runs-on: ${{ matrix.os }}
41+
steps:
42+
- uses: actions/checkout@v3
43+
- run: rustup target add ${{ matrix.target }}
44+
- name: Install arm64 toolchain
45+
if: matrix.code-target == 'linux-arm64'
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y gcc-aarch64-linux-gnu
49+
- name: Cache
50+
uses: Swatinem/rust-cache@v2
51+
with:
52+
shared-key: release-${{ matrix.target }}
53+
- name: Test
54+
run: cargo test --target ${{ matrix.target }}
55+
env:
56+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
57+
- name: Coverage
58+
run: cargo coverage --diff
59+
env:
60+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc

0 commit comments

Comments
 (0)