-
Notifications
You must be signed in to change notification settings - Fork 221
76 lines (64 loc) · 1.77 KB
/
unix.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
name: Unix build and tests
on:
pull_request:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
env:
CARGO_INCREMENTAL: false
FORCE_JAVASCRIPT_ACTIONS_TO_NODE20: true
jobs:
what-to-run:
runs-on: ubuntu-latest
outputs:
os: ${{steps.set-matrix.outputs.os}}
steps:
- id: set-matrix
env:
MACOS: $((github.event.workflow_dispatch || github.event.schedule ))
run: |
if [ "$MACOS" == "true" ]
then
echo 'os=["ubuntu-latest", "macos-latest"]' >> $GITHUB_OUTPUT
else
echo ::notice::Skipping macOS checks on PR and commit. Dispatch workflow manually if needed.
echo 'os=["ubuntu-latest"]' >> $GITHUB_OUTPUT
fi
unix:
needs: what-to-run
strategy:
matrix:
os: ${{fromJson(needs.what-to-run.outputs.os)}}
rust: [ 1.75.0 ]
fail-fast: false
runs-on: ${{matrix.os}}
permissions:
id-token: write
contents: read
env:
RUST_VERSION: ${{matrix.rust}}
RUST_BACKTRACE: full
steps:
- uses: actions/checkout@v4
- name: Configure AWS Credentials
continue-on-error: true
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::567805100031:role/github-runner-tract-ci
aws-region: us-east-2
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: |
~/.rustup
~/.cargo/registry
~/.cargo/git
target
.cached
key: ${{ runner.os }}-main-${{matrix.rust}}-${{steps.date.outputs.date}}-d
- name: Native script
run: .travis/regular-tests.sh
env:
SHORT: yes