Skip to content

Commit 38a41cd

Browse files
committed
test upload
1 parent 7de1597 commit 38a41cd

File tree

2 files changed

+5
-42
lines changed

2 files changed

+5
-42
lines changed

.github/workflows/build.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
matrix:
1818
include:
1919
- { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu, platform: linux-x64, cross: general }
20-
- { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu, platform: linux-arm64, cross: aarch }
20+
# - { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu, platform: linux-arm64, cross: aarch64 }
2121
- { os: ubuntu-20.04, target: x86_64-unknown-linux-musl, platform: linux-musl, cross: cross }
22-
- { os: ubuntu-22.04, target: x86_64-unknown-freebsd, platform: linux-bsd, cross: bsd }
22+
# - { os: ubuntu-22.04, target: x86_64-unknown-freebsd, platform: linux-bsd, cross: bsd }
2323
- { os: macos-latest, target: x86_64-apple-darwin, platform: darwin-x64, cross: general }
2424
- { os: macos-latest, target: aarch64-apple-darwin, platform: darwin-arm64, cross: general }
2525
- { os: windows-latest, target: x86_64-pc-windows-msvc, platform: win32-x64, cross: general }
@@ -44,12 +44,12 @@ jobs:
4444
- name: package-unix
4545
if: ${{ matrix.os != 'windows-latest' }}
4646
run: |
47-
cp target/${{ matrix.platform }}/release/lua-language-server ${{ github.workspace }}/artifact/
47+
cp target/${{ matrix.target }}/release/lua-language-server ${{ github.workspace }}/artifact/
4848
cp resources ${{ github.workspace }}/artifact/ -r
4949
- name: package-windows
50-
if: ${{ matrix.os == 'windows-latest' }}
50+
if: ${{ matrix.os == 'windows-latest' }}
5151
run: |
52-
powershell -Command "Copy-Item -Path target\${{ matrix.platform }}\release\lua-language-server.exe -Destination ${{ github.workspace }}\artifact\"
52+
powershell -Command "Copy-Item -Path target\${{ matrix.target }}\release\lua-language-server.exe -Destination ${{ github.workspace }}\artifact\"
5353
powershell -Command "Copy-Item -Path resources -Destination ${{ github.workspace }}\artifact\ -Recurse"
5454
- name: Upload
5555
uses: actions/upload-artifact@v3

build.rs

-37
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,12 @@
1-
use std::{env, process::Command};
2-
31
fn main() {
42
std::env::set_var("CC_LOG", "1");
5-
if cfg!(target_os = "linux") && cfg!(target_arch = "aarch64") {
6-
std::env::set_var("CC", "aarch64-linux-gnu-gcc");
7-
std::env::set_var("CXX", "aarch64-linux-gnu-g++");
8-
print_compiler_version();
9-
}
10-
113
build_lua();
124
build_lua_seri();
135
build_lpeglabel();
146
cfg!(windows).then(|| build_setfilemode());
157
build_emmyluacodestyle();
168
}
179

18-
fn print_compiler_version() {
19-
if cfg!(target_os = "linux") {
20-
let cc = env::var("CC").unwrap_or_else(|_| {
21-
"gcc".to_string()
22-
});
23-
24-
let cc_version = Command::new(&cc)
25-
.arg("--version")
26-
.output()
27-
.expect("Failed to execute CC command");
28-
println!(
29-
"CC version:\n{}",
30-
String::from_utf8_lossy(&cc_version.stdout)
31-
);
32-
33-
let cxx = env::var("CXX").unwrap_or_else(|_| {
34-
"g++".to_string()
35-
});
36-
37-
let cxx_version = Command::new(&cxx)
38-
.arg("--version")
39-
.output()
40-
.expect("Failed to execute CXX command");
41-
println!(
42-
"CXX version:\n{}",
43-
String::from_utf8_lossy(&cxx_version.stdout)
44-
);
45-
}
46-
}
4710

4811
fn build_lua() {
4912
cc::Build::new()

0 commit comments

Comments
 (0)