Skip to content

Commit

Permalink
First Attempt to fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vcfxb committed Oct 27, 2024
1 parent 1a7d7d8 commit fb073fd
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/cargo-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@ jobs:
- parser
- wright_library_defaults
- wright_binary

- default
targets:
- --lib
- --tests
os: [ubuntu-24.04, windows-latest, macos-latest]
shell: ["bash", "msys2 {0}"]
include:
- os: macos-latest
llvm-install-dir: /opt/homebrew/opt/llvm
- features: wright_binary
targets: --bins
- features: default
targets: --bins
exclude:
- os: windows-latest
shell: bash
Expand Down Expand Up @@ -100,10 +107,10 @@ jobs:

- name: Run cargo check (Mac Only)
if: ${{ matrix.os == 'macos-latest' }}
run: cargo check --no-default-features -F ${{ matrix.features }}
run: cargo check --no-default-features -F ${{ matrix.features }} ${{ matrix.targets }}
env:
LLVM_SYS_180_PREFIX: ${{ matrix.llvm-install-dir }}

- name: Run cargo check (Ubuntu & Windows)
if: ${{ matrix.os != 'macos-latest' }}
run: cargo check --no-default-features -F ${{ matrix.features }}
run: cargo check --no-default-features -F ${{ matrix.features }} ${{ matrix.targets }}
13 changes: 10 additions & 3 deletions .github/workflows/cargo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@ jobs:
- parser
- wright_library_defaults
- wright_binary

- default
targets:
- --lib
- --tests
os: [ubuntu-24.04, windows-latest, macos-latest]
shell: ["bash", "msys2 {0}"]
include:
- os: macos-latest
llvm-install-dir: /opt/homebrew/opt/llvm
- features: wright_binary
targets: --bins
- features: default
targets: --bins
exclude:
- os: windows-latest
shell: bash
Expand Down Expand Up @@ -100,10 +107,10 @@ jobs:

- name: Run cargo test (Mac Only)
if: ${{ matrix.os == 'macos-latest' }}
run: cargo test --no-default-features -F ${{ matrix.features }}
run: cargo test --no-default-features -F ${{ matrix.features }} ${{ matrix.targets }}
env:
LLVM_SYS_180_PREFIX: ${{ matrix.llvm-install-dir }}

- name: Run cargo test (Ubuntu & Windows)
if: ${{ matrix.os != 'macos-latest' }}
run: cargo test --no-default-features -F ${{ matrix.features }}
run: cargo test --no-default-features -F ${{ matrix.features }} ${{ matrix.targets }}
5 changes: 4 additions & 1 deletion wright/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ harness = false
# Also include support for detecting unicode capabilities on the host terminal.
default = [
"wright_binary",
"supports-unicode"
"supports-unicode",
"dep:llvm-sys"
]

# Features and dependencies required for the wright binary (currently just the library defaults and `clap`).
Expand Down Expand Up @@ -207,9 +208,11 @@ optional = true

# Unsafe bindings to LLVM
# See https://llvm.org/.
# Optional: Currently not required by anything yet.
[dependencies.llvm-sys]
version = "180"
features = ["force-static"]
optional = true

# TEST DEPENDENCIES
[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion wright/src/bin/wright.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// //! Command line interface for wright.
//! Command line interface for wright.
use anyhow::Result;
use clap::{Parser, Subcommand};
Expand Down

0 comments on commit fb073fd

Please sign in to comment.