Skip to content

Commit 65a76f4

Browse files
haowqsjyao1
authored andcommitted
.github: sync code form main to staging
Signed-off-by: haowei <WeiX.Hao@intel.com>
1 parent f3485f3 commit 65a76f4

File tree

3 files changed

+113
-11
lines changed

3 files changed

+113
-11
lines changed

.github/workflows/devtools.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
on:
2+
push:
3+
paths-ignore:
4+
- "**.md"
5+
pull_request:
6+
paths-ignore:
7+
- "**.md"
8+
workflow_dispatch:
9+
10+
name: Devtools
11+
12+
env:
13+
AS: nasm
14+
AR_x86_64_unknown_uefi: llvm-ar
15+
CC_x86_64_unknown_uefi: clang
16+
STABLE_RUST_TOOLCHAIN: 1.58.1
17+
NIGHTLY_RUST_TOOLCHAIN: nightly-2021-08-20
18+
TOOLCHAIN_PROFILE: minimal
19+
20+
jobs:
21+
devtools_install:
22+
name: Install
23+
runs-on: ${{ matrix.host_os }}
24+
timeout-minutes: 30
25+
26+
strategy:
27+
matrix:
28+
host_os:
29+
- ubuntu-20.04
30+
- windows-2019
31+
steps:
32+
- name: Install LLVM and Clang
33+
uses: KyleMayes/install-llvm-action@v1
34+
with:
35+
version: "10.0"
36+
directory: ${{ runner.temp }}/llvm
37+
38+
- name: install NASM
39+
uses: ilammy/setup-nasm@v1
40+
41+
- name: Checkout sources
42+
uses: actions/checkout@v2
43+
44+
- name: Install stable toolchain
45+
uses: actions-rs/toolchain@v1
46+
with:
47+
profile: ${{ env.TOOLCHAIN_PROFILE }}
48+
toolchain: ${{ env.STABLE_RUST_TOOLCHAIN }}
49+
override: true
50+
51+
- name: Install nightly toolchain
52+
uses: actions-rs/toolchain@v1
53+
with:
54+
profile: ${{ env.TOOLCHAIN_PROFILE }}
55+
toolchain: ${{ env.NIGHTLY_RUST_TOOLCHAIN }}
56+
override: true
57+
58+
- name: Cache
59+
uses: Swatinem/rust-cache@v1
60+
61+
- name: Install devtools
62+
run: make install-devtools
63+
64+
- name: Set PATH
65+
shell: bash
66+
run: |
67+
echo "$GITHUB_WORKSPACE/devtools/bin" >> $GITHUB_PATH
68+
69+
- name: Exec Runner Server
70+
run: test-runner-server -h

.github/workflows/format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: install NASM
2626
uses: ilammy/setup-nasm@v1
2727

28-
- name: Install nightly toolchain with clippy available
28+
- name: Install toolchain with clippy available
2929
uses: actions-rs/toolchain@v1
3030
with:
3131
profile: minimal
@@ -54,7 +54,7 @@ jobs:
5454
- name: Checkout sources
5555
uses: actions/checkout@v2
5656

57-
- name: Install nightly toolchain with rustfmt available
57+
- name: Install toolchain with rustfmt available
5858
uses: actions-rs/toolchain@v1
5959
with:
6060
profile: minimal

.github/workflows/library.yml

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ env:
1313
AS: nasm
1414
AR_x86_64_unknown_uefi: llvm-ar
1515
CC_x86_64_unknown_uefi: clang
16-
RUST_TOOLCHAIN: nightly-2021-08-20
16+
STABLE_RUST_TOOLCHAIN: 1.58.1
17+
NIGHTLY_RUST_TOOLCHAIN: nightly-2021-08-20
1718
TOOLCHAIN_PROFILE: minimal
1819

1920
jobs:
20-
library_compile:
21+
compile:
2122
name: Build Library Crates
2223
runs-on: ${{ matrix.host_os }}
2324
timeout-minutes: 30
@@ -38,16 +39,23 @@ jobs:
3839
- name: install NASM
3940
uses: ilammy/setup-nasm@v1
4041

41-
- name: Checkout sources
42-
uses: actions/checkout@v2
42+
- name: Install stable toolchain
43+
uses: actions-rs/toolchain@v1
44+
with:
45+
profile: ${{ env.TOOLCHAIN_PROFILE }}
46+
toolchain: ${{ env.STABLE_RUST_TOOLCHAIN }}
47+
override: true
4348

44-
- name: Install toolchain
49+
- name: Install nightly toolchain
4550
uses: actions-rs/toolchain@v1
4651
with:
4752
profile: ${{ env.TOOLCHAIN_PROFILE }}
48-
toolchain: ${{ env.RUST_TOOLCHAIN }}
53+
toolchain: ${{ env.NIGHTLY_RUST_TOOLCHAIN }}
4954
override: true
5055

56+
- name: Checkout sources
57+
uses: actions/checkout@v2
58+
5159
- name: Cache
5260
uses: Swatinem/rust-cache@v1
5361

@@ -65,11 +73,35 @@ jobs:
6573
timeout-minutes: 30
6674

6775
steps:
68-
- uses: actions/checkout@v2
69-
- uses: actions-rs/toolchain@v1
76+
# Install first since it's needed to build NASM
77+
- name: Install LLVM and Clang
78+
uses: KyleMayes/install-llvm-action@v1
79+
with:
80+
version: "10.0"
81+
directory: ${{ runner.temp }}/llvm
82+
83+
- name: install NASM
84+
uses: ilammy/setup-nasm@v1
85+
86+
- name: Install stable toolchain
87+
uses: actions-rs/toolchain@v1
88+
with:
89+
profile: ${{ env.TOOLCHAIN_PROFILE }}
90+
toolchain: ${{ env.STABLE_RUST_TOOLCHAIN }}
91+
override: true
92+
93+
- name: Install nightly toolchain
94+
uses: actions-rs/toolchain@v1
7095
with:
71-
profile: minimal
96+
profile: ${{ env.TOOLCHAIN_PROFILE }}
97+
toolchain: ${{ env.NIGHTLY_RUST_TOOLCHAIN }}
7298
override: true
7399

100+
- name: Checkout sources
101+
uses: actions/checkout@v2
102+
103+
- name: Cache
104+
uses: Swatinem/rust-cache@v1
105+
74106
- name: Test library crates
75107
run: make lib-test

0 commit comments

Comments
 (0)