-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (76 loc) · 2.43 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Test Release
on:
push:
pull_request:
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
platform:
- platform_name: Linux-x86_64
os: ubuntu-24.04
target: x86_64-unknown-linux-gnu
cache-cross-binary: true
- platform_name: Linux-powerpc64
os: ubuntu-24.04
target: powerpc64-unknown-linux-gnu
cache-cross-binary: true
- platform_name: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
- platform_name: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Copy test project to root
shell: bash
run: |
cp -a test-project/* .
rm -fr test-project
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
args: "--release"
target: ${{ matrix.platform.target }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
id: release
uses: ./
with:
executable-name: test-project
target: ${{ matrix.platform.target }}
# We always to do a release during tests, just to make sure that the release part of the
# action works.
_force-release-for-testing: true
action-gh-release-parameters: |
{
"repository": "houseabsolute/actions-rust-release-testing",
"token": "${{ secrets.ACTIONS_RUST_RELEASE_TESTING_TOKEN }}"
}
- name: Install psutils on Windows
run: choco install --ignore-checksums psutils
if: runner.os == 'Windows'
- name: Check release artifacts
shell: bash
run: |
./tests/check-release.py \
--artifact-id "${{ steps.release.outputs.artifact-id }}" \
--executable-name test-project \
--github-token "${{ github.token }}" \
--repo houseabsolute/actions-rust-release \
--target "${{ matrix.platform.target }}"
test-validate-inputs:
name: Test validate-inputs
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run tests
shell: bash
run: ./validate-inputs.py --test