ci: fix windows/macos (#116)

* cryptonight: include homebrew directories

* test-utils: add arm macos to `monerod` downloader

* ci: install windows-gnu
This commit is contained in:
hinto-janai 2024-04-26 19:49:55 -04:00 committed by GitHub
parent 32a44a2503
commit 2ac90420c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 1 deletions

View file

@ -96,6 +96,12 @@ jobs:
update: true update: true
install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-boost msys2-runtime-devel git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-boost msys2-runtime-devel git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja
- name: Switch target (Windows)
if: matrix.os == 'windows-latest'
run: |
rustup toolchain install stable-x86_64-pc-windows-gnu -c clippy --no-self-update
rustup default stable-x86_64-pc-windows-gnu
- name: Documentation - name: Documentation
run: cargo doc --workspace --all-features run: cargo doc --workspace --all-features

View file

@ -32,7 +32,10 @@ fn main() {
// 29 | extern int ftime (struct timeb *__timebuf) // 29 | extern int ftime (struct timeb *__timebuf)
// | ^~~~~ // | ^~~~~
// This flag doesn't work on MSVC and breaks CI. // This flag doesn't work on MSVC and breaks CI.
.flag_if_supported("-Wno-deprecated-declarations"); .flag_if_supported("-Wno-deprecated-declarations")
// `#include <boost>` isn't found without this in macOS CI.
// <https://github.com/Cuprate/cuprate/pull/116>
.flag_if_supported("-I/opt/homebrew/include");
// Optimization flags are automatically added. // Optimization flags are automatically added.
// https://docs.rs/cc/latest/cc/struct.Build.html#method.opt_level // https://docs.rs/cc/latest/cc/struct.Build.html#method.opt_level

View file

@ -29,6 +29,7 @@ fn file_name(version: &str) -> (String, String) {
("linux", "x64" | "x86_64") => format!("monero-linux-x64-{version}.tar.bz2"), ("linux", "x64" | "x86_64") => format!("monero-linux-x64-{version}.tar.bz2"),
("linux", "x86") => format!("monero-linux-x86-{version}.tar.bz2"), ("linux", "x86") => format!("monero-linux-x86-{version}.tar.bz2"),
("macos", "x64" | "x86_64") => format!("monero-mac-x64-{version}.tar.bz2"), ("macos", "x64" | "x86_64") => format!("monero-mac-x64-{version}.tar.bz2"),
("macos", "aarch64") => format!("monero-mac-armv8-{version}.tar.bz2"),
_ => panic!("Can't get monerod for {OS}, {ARCH}."), _ => panic!("Can't get monerod for {OS}, {ARCH}."),
}; };
@ -42,6 +43,7 @@ fn file_name(version: &str) -> (String, String) {
("macos", "x64" | "x86_64") => { ("macos", "x64" | "x86_64") => {
format!("monero-x86_64-apple-darwin11-{version}") format!("monero-x86_64-apple-darwin11-{version}")
} }
("macos", "aarch64") => format!("monero-aarch64-apple-darwin11-{version}"),
_ => panic!("Can't get monerod for {OS}, {ARCH}."), _ => panic!("Can't get monerod for {OS}, {ARCH}."),
}; };