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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# Examples:
# * https://github.com/rust-lang/cargo/blob/master/.github/workflows/main.yml
name: rust_stable_beta_nightly_1_45_2
on:
- push
- pull_request
# on:
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
jobs:
continuous_integration:
env:
RUSTUP_COMPONENTS: 'cargo,clippy,rustfmt,rustfmt-preview'
RUSTUP_PROFILE: 'minimal'
CARGO_TERM_COLOR: always
CARGO_TERM_VERBOSE: 1
RUSTUP_COMPONENTS_TEST: ${{ 'cargo,clippy,rustfmt,rustfmt-preview' }}
continue-on-error: true
strategy:
max-parallel: 32
fail-fast: false
matrix:
rust:
- 1.45.2
# - nightly
# - beta
# - stable
os:
- ubuntu-20.04
runs-on: ${{ matrix.os }}
name: ${{ github.event.repository.name }}_${{ matrix.os }}_${{ matrix.rust }}
steps:
- name: environment_details - ${{ matrix.os }}_${{ matrix.rust }}
continue-on-error: true
shell: bash
run: |
echo "'uname -a'=$(uname -a)"
echo "'uname -s'=$(uname -s)"
- name: install lld and lld-10 - ${{ matrix.os }}_${{ matrix.rust }}
continue-on-error: false
run: |
sudo apt-get install lld
sudo apt-get install lld-10
find /usr/bin/ -iname '*lld*' -or -iname '*ld-10*'
find /usr/bin/ -iname '*lld*' -or -iname '*ld-10*' | wc -l
- name: find lld and lld-10 - ${{ matrix.os }}_${{ matrix.rust }}
continue-on-error: true
run: |
linkers=$(find /usr/bin -iname '*lld*' -o -iname '*ld-10*')
echo "linkers=${linkers//$'\n'/,}"
echo "total=$(echo "${linkers}" | wc -l)"
- uses: actions/checkout@v2
continue-on-error: false
- name: install toolchain profile=${{ env.RUSTUP_PROFILE }}, rust@${{ matrix.rust }}, components=${{ env.RUSTUP_COMPONENTS }} - ${{ matrix.os }}_${{ matrix.rust }}
uses: actions-rs/toolchain@v1
continue-on-error: false
with:
override: true
profile: ${{ env.RUSTUP_PROFILE }}
components: ${{ env.RUSTUP_COMPONENTS }}
toolchain: ${{ matrix.rust }}
# target: ${{ matrix.target }}
- name: test - ${{ matrix.os }}_${{ matrix.rust }}
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: test
args: |
--workspace --release --no-fail-fast -- --test-threads=32 --nocapture --show-output
# --target=${{ matrix.target }}
- name: build - ${{ matrix.os }}_${{ matrix.rust }}
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: build
args: |
--workspace --release --jobs=32 --all-features
- name: cargo run -- --help - ${{ matrix.os }}_${{ matrix.rust }}
continue-on-error: true
run: |
cargo run -- --help
# - name: check - ${{ matrix.os }}_${{ matrix.rust }}
# uses: actions-rs/cargo@v1
# continue-on-error: true
# with:
# command: check
# args: |
# --
# - name: lint - ${{ matrix.os }}_${{ matrix.rust }}
# uses: actions-rs/cargo@v1
# continue-on-error: true
# with:
# command: clippy
# args: |
# --
# - name: fmt - ${{ matrix.os }}_${{ matrix.rust }}
# uses: actions-rs/cargo@v1
# continue-on-error: true
# with:
# command: fmt
# args: |
# --all -- --check
# env:
# RUSTUP_COMPONENTS: cargo,clippy,rustfmt,rustfmt-preview
# RUSTUP_PROFILE: minimal
# CARGO_TERM_COLOR: always
# CARGO_TERM_VERBOSE: 1
# # CARGO_INCREMENTAL: 1
# # RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
# os:
# - ubuntu-20.04
# # - ubuntu-16.04
# # - ubuntu-18.04
# # - ubuntu-latest
# # - macos-10.15
# # - macos-latest
# # target:
# # - armv7-unknown-linux-gnueabihf
# # - powerpc64-unknown-linux-gnu
# # - nightly-x86_64-unknown-linux-gnu
# # - stable-x86_64-unknown-linux-gnu
# # [[ -z "$TERM" ]] && export TERM=dumb # Set a dummy terminal type if none set
# # [[ ! -t 1 ]] && export TERM=dumb # Set a dummy terminal type unless a tty
# [[ -z "$TERM" ]] && export TERM="xterm-256color" # Set a xterm-256color terminal type if none set
# [[ ! -t 1 ]] && export TERM="xterm-256color" # Set a xterm-256color terminal type if none set
# export text="environment_details=${{ matrix.os }}_${{ matrix.rust }}"
# printf "%b" $(
# tput bold
# tput setaf 7
# tput setab 5
# ) "${text}:" $() " " $() $(printf -- '-%.0s' $(seq 1 $(expr $(tput cols) - "${#text}" - 3))) $(tput sgr0) "\n"
# echo ${RUSTUP_PROFILE} || true
# echo ${RUSTUP_COMPONENTS} || true
# echo ${RUSTUP_COMPONENTS_TEST} || true
# name: jsonc_tools.rs_${{ github.event.repository.name }}_${{ github.repository }}_${{ matrix.os }}_${{ matrix.rust }}
# steps:
# - name: Dump GitHub context
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: echo "$GITHUB_CONTEXT"
# - name: Dump job context
# env:
# JOB_CONTEXT: ${{ toJson(job) }}
# run: echo "$JOB_CONTEXT"
# - name: Dump steps context
# env:
# STEPS_CONTEXT: ${{ toJson(steps) }}
# run: echo "$STEPS_CONTEXT"
# - name: Dump runner context
# env:
# RUNNER_CONTEXT: ${{ toJson(runner) }}
# run: echo "$RUNNER_CONTEXT"
# - name: Dump strategy context
# env:
# STRATEGY_CONTEXT: ${{ toJson(strategy) }}
# run: echo "$STRATEGY_CONTEXT"
# - name: Dump matrix context
# env:
# MATRIX_CONTEXT: ${{ toJson(matrix) }}
# run: echo "$MATRIX_CONTEXT"