59
59
runs-on : ${{ matrix.os }}
60
60
env :
61
61
CARGO : cargo
62
- RUSTFLAGS : -C strip=symbols
63
62
TARGET_FLAGS : --target ${{ matrix.target }}
64
63
TARGET_DIR : ./target/${{ matrix.target }}
65
64
RUST_BACKTRACE : 1
@@ -72,30 +71,26 @@ jobs:
72
71
rust : stable
73
72
target : x86_64-unknown-linux-musl
74
73
arch : x86_64
75
- strip : strip
76
74
- build : linux-armv7
77
75
os : ubuntu-18.04
78
76
rust : stable
79
77
target : armv7-unknown-linux-gnueabihf
80
78
arch : armv7
81
- strip : arm-linux-gnueabihf-strip
82
79
- build : linux-aarch64
83
80
os : ubuntu-18.04
84
81
rust : stable
85
82
target : aarch64-unknown-linux-musl
86
83
arch : aarch64
87
- strip : aarch64-linux-musl-strip
88
84
- build : macos
89
85
os : macOS-latest
90
86
rust : stable
91
87
target : x86_64-apple-darwin
92
88
arch : x86_64
93
- strip : strip
94
89
# - build: macos-aarch64
95
90
# os: macOS-latest
96
91
# rust: stable
97
92
# target: aarch64-apple-darwin
98
- # strip: strip
93
+ # arch: aarch64
99
94
100
95
steps :
101
96
- name : Checkout repository
@@ -116,7 +111,7 @@ jobs:
116
111
target : ${{ matrix.target }}
117
112
118
113
- name : Use Cross
119
- if : matrix.build == 'linux- armv7' || matrix.build == 'linux- aarch64'
114
+ if : matrix.arch == 'armv7' || matrix.arch == 'aarch64'
120
115
run : |
121
116
cargo install cross
122
117
echo "CARGO=cross" >> $GITHUB_ENV
@@ -138,24 +133,17 @@ jobs:
138
133
echo "release version: $RELEASE_VERSION"
139
134
140
135
- name : Build release binary
141
- run : RUSTFLAGS="${{ env.RUSTFLAGS }}" ${{ env.CARGO }} build ${{ env.TARGET_FLAGS }} --verbose --release
136
+ run : ${{ env.CARGO }} build ${{ env.TARGET_FLAGS }} --verbose --release
142
137
143
- - name : Strip release binary (arm)
144
- if : matrix.build == 'linux-armv7' || matrix.build == 'linux-aarch64'
145
- run : |
146
- docker run --rm -v $PWD/target:/target:Z \
147
- rustembedded/cross:${{ matrix.target }} \
148
- ${{ matrix.strip }} /target/${{ matrix.target }}/release/phpup
149
-
150
- - name : Generate completion files
151
- if : matrix.build == 'linux' || matrix.build == 'macos'
138
+ - name : Generate completion files (x86_64)
139
+ if : matrix.arch == 'x86_64'
152
140
run : |
153
141
mkdir -p completions/{bash,zsh}
154
142
./target/${{ matrix.target }}/release/phpup completions --shell bash > completions/bash/_phpup
155
143
./target/${{ matrix.target }}/release/phpup completions --shell zsh > completions/zsh/_phpup
156
144
157
145
- name : Generate completion files (arm)
158
- if : matrix.build == 'linux- armv7' || matrix.build == 'linux- aarch64'
146
+ if : matrix.arch == 'armv7' || matrix.arch == 'aarch64'
159
147
160
148
with :
161
149
arch : ${{ matrix.arch }}
0 commit comments