1010 CARGO_TERM_COLOR : always
1111
1212jobs :
13- build :
14- name : Pipeline
15- runs-on : ${{ matrix.os }}
16- strategy :
17- matrix :
18- build : [ubuntu, macos, win32, win64]
19- include :
20- - build : ubuntu
21- os : ubuntu-latest
22- rust : stable
23- - build : macos
24- os : macos-latest
25- rust : stable
26- - build : win32
27- os : windows-latest
28- rust : stable-i686
29- - build : win64
30- os : windows-latest
31- rust : stable-x86_64
13+ build_ubuntu :
14+ name : Ubuntu Build
15+ runs-on : ubuntu-latest
3216 steps :
33- - uses : actions/checkout@v2.3.4
17+ - uses : actions/checkout@v2
3418 - name : Install Rust (rustup)
3519 run : |
36- rustup update ${{ matrix.rust }} --no-self-update
37- rustup default ${{ matrix.rust }}
20+ rustup update stable --no-self-update
21+ rustup default stable
3822 rustup component add rustfmt
3923 rustup component add clippy
4024 - name : Build
@@ -46,54 +30,127 @@ jobs:
4630 - name : Lint Check
4731 run : |
4832 cargo clippy --version
49- cargo clippy -p rustybox - - --verbose -D warnings
33+ cargo clippy -- --verbose -D warnings
5034 - name : Test
5135 run : cargo test --verbose
5236 - name : Build Release
5337 run : cargo build --release --verbose
54- - name : Move Artifacts (ubuntu)
55- if : ${{ matrix.build == 'ubuntu' }}
38+ - name : Move Artifacts
5639 run : |
57- cp target/release/rustybox rustybox
58- chmod +x rustybox
59- tar -cvzf rustybox-ubuntu.tar.gz rustybox assets
60- - name : Move Artifacts (macos)
61- if : ${{ matrix.build == 'macos' }}
62- run : |
63- cp target/release/rustybox rustybox
64- chmod +x rustybox
65- tar -cvzf rustybox-macos.tar.gz rustybox assets
66- - name : Move Artifacts (win32)
67- if : ${{ matrix.build == 'win32' }}
68- run : copy target\release\rustybox.exe rustybox.exe
69- - name : Move Artifacts (win64)
70- if : ${{ matrix.build == 'win64' }}
71- run : copy target\release\rustybox.exe rustybox.exe
72- - name : Upload Artifact (ubuntu)
73- if : ${{ matrix.build == 'ubuntu' }}
74- uses : actions/upload-artifact@v2.2.2
75- with :
76- name : rustybox-${{ matrix.build }}
77- path : rustybox-ubuntu.tar.gz
78- - name : Upload Artifact (macos)
79- if : ${{ matrix.build == 'macos' }}
80- uses : actions/upload-artifact@v2.2.2
81- with :
82- name : rustybox-${{ matrix.build }}
83- path : rustybox-macos.tar.gz
84- - name : Upload Artifact (win32)
85- if : ${{ matrix.build == 'win32' }}
86- uses : actions/upload-artifact@v2.2.2
40+ ls target/release
41+ cp target/release/rustyhack_client rustyhack-client
42+ ls target/release
43+ cp target/release/rustyhack_server rustyhack-server
44+ chmod +x rustyhack-client
45+ chmod +x rustyhack-server
46+ tar -cvzf rustyhack-client-ubuntu.tar.gz rustyhack-client
47+ tar -cvzf rustyhack-server-ubuntu.tar.gz rustyhack-server assets
48+ - name : Upload Artifact Client
49+ uses : actions/upload-artifact@v2
8750 with :
88- name : rustybox-${{ matrix.build }}
89- path : |
90- rustybox.exe
91- assets\**\*
92- - name : Upload Artifact (win64)
93- if : ${{ matrix.build == 'win64' }}
94- uses : actions/upload-artifact@v2.2.2
51+ name : rustyhack-client-ubuntu
52+ path : rustyhack-client-ubuntu.tar.gz
53+ - name : Upload Artifact Server
54+ uses : actions/upload-artifact@v2
9555 with :
96- name : rustybox-${{ matrix.build }}
97- path : |
98- rustybox.exe
99- assets\**\*
56+ name : rustyhack-server-ubuntu
57+ path : rustyhack-server-ubuntu.tar.gz
58+
59+ build_macos :
60+ name : Mac Build
61+ runs-on : macos-latest
62+ steps :
63+ - uses : actions/checkout@v2
64+ - name : Install Rust (rustup)
65+ run : |
66+ rustup update stable --no-self-update
67+ rustup default stable
68+ - name : Test
69+ run : cargo test --verbose
70+ - name : Build Release
71+ run : cargo build --release --verbose
72+ - name : Move Artifacts
73+ run : |
74+ cp target/release/rustyhack_client rustyhack-client
75+ cp target/release/rustyhack_server rustyhack-server
76+ chmod +x rustyhack-client
77+ chmod +x rustyhack-server
78+ tar -cvzf rustyhack-client-macos.tar.gz rustyhack-client
79+ tar -cvzf rustyhack-server-macos.tar.gz rustyhack-server assets
80+ - name : Upload Artifact Client
81+ uses : actions/upload-artifact@v2
82+ with :
83+ name : rustyhack-client-macos
84+ path : rustyhack-client-macos.tar.gz
85+ - name : Upload Artifact Server
86+ uses : actions/upload-artifact@v2
87+ with :
88+ name : rustyhack-server-macos
89+ path : rustyhack-server-macos.tar.gz
90+
91+ build_win32 :
92+ name : Win32 Build
93+ runs-on : windows-latest
94+ steps :
95+ - uses : actions/checkout@v2
96+ - name : Install Rust (rustup)
97+ run : |
98+ rustup update stable-i686 --no-self-update
99+ rustup default stable-i686
100+ - name : Test
101+ run : cargo test --verbose
102+ - name : Build Release
103+ run : cargo build --release --verbose
104+ - name : Move Artifacts
105+ run : |
106+ copy target\release\rustyhack_client.exe rustyhack-client.exe
107+ copy target\release\rustyhack_server.exe rustyhack-server.exe
108+ - name : Upload Artifact Client (win32)
109+ uses : actions/upload-artifact@v2
110+ with :
111+ name : rustyhack-client-win32
112+ path : rustyhack-client.exe
113+ - name : Upload Artifact Server (win32)
114+ uses : actions/upload-artifact@v2
115+ with :
116+ name : rustyhack-server-win32
117+ path : |
118+ rustyhack-server.exe
119+ assets\**\*
120+
121+ build_win64 :
122+ name : Win64 Build
123+ runs-on : windows-latest
124+ steps :
125+ - uses : actions/checkout@v2
126+ - name : Install Rust (rustup)
127+ run : |
128+ rustup update stable-x86_64 --no-self-update
129+ rustup default stable-x86_64
130+ - name : Test
131+ run : cargo test --verbose
132+ - name : Build Release
133+ run : cargo build --release --verbose
134+ - name : Move Artifacts
135+ run : |
136+ copy target\release\rustyhack_client.exe rustyhack-client.exe
137+ copy target\release\rustyhack_server.exe rustyhack-server.exe
138+ - name : Upload Artifact Client (win64)
139+ uses : actions/upload-artifact@v2
140+ with :
141+ name : rustyhack-client-win64
142+ path : rustyhack-client.exe
143+ - name : Upload Artifact Server (win64)
144+ uses : actions/upload-artifact@v2
145+ with :
146+ name : rustyhack-server-win64
147+ path : |
148+ rustyhack-server.exe
149+ assets\**\*
150+
151+ update_release_draft :
152+ runs-on : ubuntu-latest
153+ steps :
154+ - uses : release-drafter/release-drafter@v5
155+ env :
156+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments