File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ inputs :
2+ target :
3+ description : toolchain.target
4+ required : false
5+
6+ components :
7+ description : toolchain.components
8+ required : false
9+
10+ command :
11+ description : cargo.command
12+ required : true
13+
14+ args :
15+ description : cargo.args
16+ required : false
17+
18+ use-cross :
19+ description : cargo.use-cross
20+ required : false
21+ default : false
22+
23+ runs :
24+ using : composite
25+
26+ steps :
27+ - uses : actions-rs/toolchain@v1
28+ with :
29+ toolchain : nightly # for cargo-features = ["strip"]
30+ target : ${{ inputs.target }}
31+ override : true
32+ profile : minimal
33+ components : ${{ inputs.components }}
34+
35+ - uses : actions-rs/cargo@v1
36+ with :
37+ command : ${{ inputs.command }}
38+ args : ${{ inputs.args }}
39+ use-cross : ${{ inputs.use-cross }}
Original file line number Diff line number Diff line change 1+ on : push
2+
3+ jobs :
4+ run :
5+ runs-on : ubuntu-latest
6+
7+ steps :
8+ - uses : actions/checkout@v2
9+
10+ - uses : ./.github/actions/cargo
11+ with :
12+ command : run
13+ args : -- --help
14+
15+ test :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - uses : actions/checkout@v2
20+
21+ - uses : ./.github/actions/cargo
22+ with :
23+ command : test
24+
25+ fmt :
26+ runs-on : ubuntu-latest
27+
28+ steps :
29+ - uses : actions/checkout@v2
30+
31+ - uses : ./.github/actions/cargo
32+ with :
33+ components : rustfmt
34+ command : fmt
35+ args : --check
36+
37+ clippy :
38+ runs-on : ubuntu-latest
39+
40+ steps :
41+ - uses : actions/checkout@v2
42+
43+ - uses : ./.github/actions/cargo
44+ with :
45+ components : clippy
46+ command : clippy
Original file line number Diff line number Diff line change 11on :
2- push :
3- tags :
4- - ' *'
5-
6- permissions :
7- contents : write
2+ release :
3+ types : [published]
84
95jobs :
106 release :
117 runs-on : ubuntu-latest
128
9+ strategy :
10+ matrix :
11+ target :
12+ - aarch64-unknown-linux-gnu
13+ - armv7-unknown-linux-gnueabihf
14+ - i686-unknown-linux-gnu
15+ - x86_64-unknown-linux-gnu
16+
1317 steps :
14- - run : |
15- sudo apt update
16- sudo apt install --assume-yes gcc-multilib
18+ - uses : actions/checkout@v2
1719
18- - uses : actions/setup-go@v2
20+ - uses : ./.github/ actions/cargo
1921 with :
20- go-version : 1.17
22+ target : ${{ matrix.target }}
23+ command : build
24+ args : --release --target ${{ matrix.target }}
25+ use-cross : true
2126
22- - uses : actions/checkout@v2
23- with :
24- fetch-depth : 0
27+ - run : echo "TARBALL=osm-${{ github.event.release.tag_name }}-${{ matrix.target }}.tar.xz" >> $GITHUB_ENV
28+ - run : tar caf $TARBALL --directory=target/${{ matrix.target }}/release osm
2529
26- - uses : goreleaser/goreleaser- action@v2
30+ - uses : softprops/ action-gh-release@v1
2731 with :
28- args : release --rm-dist
29- env :
30- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32+ files : ${{ env.TARBALL }}
33+ fail_on_unmatched_files : true
Original file line number Diff line number Diff line change 1- /dist /
2- / osm
1+ /target
2+ ** / * .rs.bk
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments