Skip to content

Commit 31bea95

Browse files
committed
fixing testing harness
1 parent a82b837 commit 31bea95

File tree

7 files changed

+174
-264
lines changed

7 files changed

+174
-264
lines changed

.github/workflows/arm.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: ARM Test
2+
on:
3+
workflow_call:
4+
inputs:
5+
target:
6+
required: true
7+
type: string
8+
target-in-caps:
9+
required: true
10+
type: string
11+
12+
jobs:
13+
test-software:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
channel: [ stable, beta, nightly ]
18+
name: Test of Software AES on ${{ inputs.target }} with ${{ matrix.channel }}
19+
uses: ./.github/workflows/runtest.yml
20+
with:
21+
target: ${{ inputs.target }}
22+
channel: ${{ matrix.channel }}
23+
24+
test-neon:
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
channel: [ stable, beta, nightly ]
29+
name: Test of Neon on ${{ inputs.target }} with ${{ matrix.channel }}
30+
uses: ./.github/workflows/runtest.yml
31+
with:
32+
target: ${{ inputs.target }}
33+
channel: ${{ matrix.channel }}
34+
env-vars: ${{ format('CROSS_TARGET_{0}_RUSTFLAGS=+aes', inputs.target-in-caps) }}

.github/workflows/common.yml

+34-8
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,50 @@ jobs:
2727
command: fmt
2828
args: --all --check
2929

30-
test:
30+
test-x86:
3131
strategy:
3232
fail-fast: false
3333
matrix:
3434
target:
3535
- triple: x86_64-unknown-linux-gnu
3636
caps: X86_64_UNKNOWN_LINUX_GNU
37+
uses: ./.github/workflows/x86.yml
38+
with:
39+
target: ${{ matrix.target.triple }}
40+
target-in-caps: ${{ matrix.target.caps }}
41+
42+
test-arm:
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
target:
3747
- triple: aarch64-unknown-linux-gnu
3848
caps: AARCH64_UNKNOWN_LINUX_GNU
49+
uses: ./.github/workflows/arm.yml
50+
with:
51+
target: ${{ matrix.target.triple }}
52+
target-in-caps: ${{ matrix.target.caps }}
53+
54+
test-riscv:
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
target:
3959
- triple: riscv64gc-unknown-linux-gnu
4060
caps: RISCV64GC_UNKNOWN_LINUX_GNU
41-
channel:
42-
- stable
43-
- beta
44-
- nightly
45-
uses: ./.github/workflows/rust.yml
61+
uses: ./.github/workflows/riscv.yml
4662
with:
4763
target: ${{ matrix.target.triple }}
4864
target-in-caps: ${{ matrix.target.caps }}
49-
channel: ${{ matrix.channel }}
50-
secrets: inherit
65+
66+
test-other:
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
target:
71+
- triple: powerpc64-unknown-linux-gnu
72+
caps: POWERPC64_UNKNOWN_LINUX_GNU
73+
uses: ./.github/workflows/other.yml
74+
with:
75+
target: ${{ matrix.target.triple }}
76+
target-in-caps: ${{ matrix.target.caps }}

.github/workflows/other.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: X86 Test
2+
on:
3+
workflow_call:
4+
inputs:
5+
target:
6+
required: true
7+
type: string
8+
9+
jobs:
10+
test-software:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
channel: [ stable, beta, nightly ]
15+
name: Test of Software AES on ${{ inputs.target }} with ${{ matrix.channel }}
16+
uses: ./.github/workflows/runtest.yml
17+
with:
18+
target: ${{ inputs.target }}
19+
channel: ${{ matrix.channel }}

.github/workflows/riscv.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: RISC-V Test
2+
on:
3+
workflow_call:
4+
inputs:
5+
target:
6+
required: true
7+
type: string
8+
target-in-caps:
9+
required: true
10+
type: string
11+
12+
jobs:
13+
test-software:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
channel: [ stable, beta, nightly ]
18+
name: Test of Software AES on ${{ inputs.target }} with ${{ matrix.channel }}
19+
uses: ./.github/workflows/runtest.yml
20+
with:
21+
target: ${{ inputs.target }}
22+
channel: ${{ matrix.channel }}
23+
24+
test-riscv:
25+
name: Test of RISC-V on ${{ inputs.target }}
26+
uses: ./.github/workflows/runtest.yml
27+
with:
28+
target: ${{ inputs.target }}
29+
channel: nightly
30+
env-vars: ${{ format('CROSS_TARGET_{0}_RUSTFLAGS=+zkne,+zknd', inputs.target-in-caps) }}

.github/workflows/runtest.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ on:
77
type: string
88
channel:
99
required: true
10-
type: boolean
11-
target-feature:
10+
type: string
11+
env-vars:
1212
required: false
1313
type: string
1414
default: ''
1515
jobs:
1616
test:
17+
continue-on-error: ${{ inputs.channel == 'nightly' }}
1718
runs-on: ubuntu-latest
1819
steps:
1920
- uses: actions/checkout@v3
2021

21-
- run: ${{ format('echo "{0}" >> $GITHUB_ENV', inputs.target-feature) }}
22+
- run: ${{ format('echo "{0}" >> $GITHUB_ENV', inputs.env-vars) }}
2223

2324
- name: Install Rust
2425
uses: actions-rs/toolchain@v1
@@ -33,19 +34,19 @@ jobs:
3334
uses: actions-rs/cargo@v1
3435
with:
3536
command: clippy
36-
args: +${{ inputs.channel }} --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
37+
args: --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
3738

3839
- name: Build
3940
uses: actions-rs/cargo@v1
4041
with:
4142
use-cross: true
4243
command: build
43-
args: +${{ inputs.channel }} --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
44+
args: --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
4445

4546
- name: Test
4647
uses: actions-rs/cargo@v1
4748
with:
4849
use-cross: true
4950
command: test
50-
args: +${{ inputs.channel }} --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
51+
args: --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
5152

0 commit comments

Comments
 (0)