Skip to content

feat: add a CI workflow for PRs and merges #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Rust validation

on:
push:
branches:
- dev
pull_request:
branches:
- dev

jobs:
rust:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest

runs-on: ${{ matrix.os }}

steps:
- uses: actions/[email protected]

- name: Check fmt
run: cargo fmt --check
- name: Build
run: |
${{ matrix.os == 'macos-latest' && 'brew install ninja'
|| (matrix.os == 'windows-latest' && 'choco install ninja'
|| 'echo "ninja already installed"') }}
cargo build --verbose
- name: Run tests
run: cargo test --verbose
2 changes: 2 additions & 0 deletions .github/workflows/update-linux.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Update bindings for Linux

on:
push:
branches:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-macos.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Update bindings for macOS

on:
push:
branches:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-windows.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Update bindings for Windows

on:
push:
branches:
Expand Down
10 changes: 4 additions & 6 deletions cef/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,10 @@ impl Args {
.iter()
.map(|arg| arg.as_ptr())
.collect::<Vec<*const c_char>>();
let cmd_line = command_line_create().map(|cmd_line| {
if !_argv.is_empty() {
cmd_line.init_from_argv(_argv.len() as i32, _argv.as_ptr());
}
cmd_line
});
let main_args = MainArgs {
argc: _argv.len() as i32,
argv: _argv.as_ptr() as *mut *mut _,
};
let cmd_line = command_line_create().map(|cmd_line| {
if !_argv.is_empty() {
cmd_line.init_from_argv(_argv.len() as i32, _argv.as_ptr());
Expand Down
6 changes: 2 additions & 4 deletions cef/src/sandbox_info.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
use std::ptr;

use crate::*;

pub struct SandboxInfo(*mut u8);

impl SandboxInfo {
#[cfg(target_os = "windows")]
pub fn new() -> Self {
Self(sandbox_info_create().cast())
Self(crate::sandbox_info_create().cast())
}

#[cfg(not(target_os = "windows"))]
Expand All @@ -30,7 +28,7 @@ impl Default for SandboxInfo {
impl Drop for SandboxInfo {
fn drop(&mut self) {
if !self.0.is_null() {
sandbox_info_destroy(self.0);
crate::sandbox_info_destroy(self.0);
}
}
}
1 change: 1 addition & 0 deletions sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ fn main() -> anyhow::Result<()> {
"shlwapi.lib",
"user32.lib",
"version.lib",
"wbemuuid.lib",
"winmm.lib",
]
.join(" ");
Expand Down
Loading