cleanup build.rs, setup cron for nightly

This commit is contained in:
Anton-4 2022-06-27 13:36:46 +02:00
parent 3a1ca7fa62
commit 80929ea84f
No known key found for this signature in database
GPG Key ID: C954D6E0F9C0ABFD
2 changed files with 5 additions and 21 deletions

View File

@ -1,11 +1,9 @@
on: [pull_request]
on:
schedule:
- cron: '0 9 * * 1' # 9=9am utc+0, 1=monday
name: Nightly Release macOS x86_64
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
ZIG_VERSION: 0.9.1
LLVM_SYS_130_PREFIX: /usr/local/opt/llvm

View File

@ -1,4 +1,3 @@
use core::panic;
use std::env;
use std::ffi::OsString;
use std::fs;
@ -13,15 +12,8 @@ fn main() {
let zig_cache_dir = PathBuf::from(&out_dir).join("zig-cache");
let out_file = PathBuf::from(&out_dir).join("wasi-libc.a");
println!("clang --version: {:?}", Command::new("clang")
.args([
"--version",
])
.output()
.unwrap());
// Compile a dummy C program with Zig, with our own private cache directory
println!("zig build-exe output: {:?}", Command::new(&zig_executable())
Command::new(&zig_executable())
.args([
"build-exe",
"-target",
@ -35,16 +27,10 @@ fn main() {
&format!("-femit-bin={}/dummy.wasm", out_dir),
])
.output()
.unwrap());
//panic!("DONE");
.unwrap();
let libc_path = find(&zig_cache_dir, &OsString::from("libc.a"))
.unwrap()
.or(
find(&zig_cache_dir, &OsString::from("libc.a"))
.unwrap()
)
.unwrap();
let compiler_rt_path = find(&zig_cache_dir, &OsString::from("compiler_rt.o"))