Skip to content
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

chore(ci): Add ci config for MacOS #115 #119

Merged
merged 26 commits into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
640985f
chore(ci): Added ci config for MacOS #115
LuchoBazz Apr 5, 2023
5cadfea
chore(ci): updated docker container #115
LuchoBazz Apr 5, 2023
030c79e
chore(ci): added actions rs image #115
LuchoBazz Apr 5, 2023
a466fb4
chore(ci): added version to rust #115
LuchoBazz Apr 5, 2023
a1ca957
fix: fixed macos.yml workflow
LuchoBazz Apr 11, 2023
5b70488
feat: added rust version config in macos workflow
LuchoBazz Apr 11, 2023
283c765
fix: fixed macos.yml workflow 2/2
LuchoBazz Apr 11, 2023
9c380d0
fix: fixed cargo clippy on macos.yml workflow
LuchoBazz Apr 11, 2023
fe0f19f
feat: added command for install c/c++ on macos
LuchoBazz Apr 11, 2023
f5f3989
fix: fixed C/C++ versions on macos workflow
LuchoBazz Apr 12, 2023
47d010b
fix: fixed C/C++ versions on macos workflow 2/2
LuchoBazz Apr 12, 2023
f338a0f
fix: fixed C/C++ versions on macos workflow 3/3
LuchoBazz Apr 12, 2023
f69a7df
fix: fixed C/C++ versions on macos workflow 4/4
LuchoBazz Apr 12, 2023
7a815fd
fix: fixed C/C++ versions on macos workflow 5/5
LuchoBazz Apr 12, 2023
1aa2a78
fix: fixed C/C++ versions on macos workflow 6/6
LuchoBazz Apr 12, 2023
4cdae02
fix: fixed C/C++ versions on macos workflow 7/7
LuchoBazz Apr 12, 2023
373200c
fix: fixed C/C++ versions on macos workflow 8/8
LuchoBazz Apr 12, 2023
3ad049b
fix: fixed macos workflow
LuchoBazz Apr 13, 2023
94f17e8
[CHORE] update workflows/macos.yml file
LuchoBazz Aug 20, 2023
c310364
[CHORE] update rust version to 1.66
LuchoBazz Aug 20, 2023
49ac2d2
Merge branch 'main' into QT-115
LuchoBazz Dec 3, 2023
e4509b2
skip tests on mac os
LuchoBazz Dec 3, 2023
5a1f29b
skip tests on mac os
LuchoBazz Dec 3, 2023
c4c075c
skip tests on mac os
LuchoBazz Dec 3, 2023
23cdeff
allow warnings in tests
LuchoBazz Dec 3, 2023
597bc30
allow warnings in tests
LuchoBazz Dec 3, 2023
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
73 changes: 73 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: MacOS Workflow

on:
push:
branches:
- main
pull_request:
branches:
- '**'
types: [opened, synchronize, reopened]

jobs:
build_and_test:
name: Build and Run test
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
rustc: 1.66
cargo: 1.66
target: x86_64-apple-darwin
components: rustfmt, clippy

- name: Install C/C++
run: brew install gcc

- name: Cargo
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features

- name: C/C++ version
run: |
gcc-12 --version
g++-12 --version

- name: Build
run: cargo build

- name: Clippy
run: cargo clippy

- name: Setup 'python3' as default
run: ./target/debug/quicktest setup config --label="Language::Python.PROGRAM" --value="python3"

- name: Setup 'g++-12' as default
run: ./target/debug/quicktest setup config --label="Language::Cpp.PROGRAM" --value="g++-12"

- name: Setup 'gcc-12' as default
run: ./target/debug/quicktest setup config --label="Language::C.PROGRAM" --value="gcc-12"

- name: Test cmp command
run: cargo test cmp_subcommand -- --test-threads 1

- name: Test stress command
run: cargo test stress_subcommand -- --test-threads 1

- name: Test check command
run: cargo test check_subcommand -- --test-threads 1

- name: Test output command
run: cargo test output_subcommand -- --test-threads 1

- name: Test setup command
run: cargo test setup_subcommand -- --test-threads 1
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ref: https://yegeun542.github.io/rust-edition-guide-ko/rust-2018/rustup-for-managing-rust-versions.html
# rustup target list
[toolchain]
channel = "1.70"
channel = "1.70"
5 changes: 5 additions & 0 deletions tests/cli/check_subcommand/cpp_mle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* License: MIT (See the LICENSE file in the repository root directory)
*/

#![allow(unused_imports)]

use std::{error::Error, process::Command};

use assert_cmd::assert::OutputAssertExt;
Expand All @@ -20,6 +22,7 @@ use crate::util::{
use super::codes::{CHECKER_CPP_CHECK, GEN_CPP_CHECK, TARGET_CPP_CHECK};

#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_check_target_mle_cpp() -> Result<(), Box<dyn Error>> {
create_files_check(
TARGET_FILE_CPP,
Expand Down Expand Up @@ -50,6 +53,7 @@ fn cmd_check_target_mle_cpp() -> Result<(), Box<dyn Error>> {
}

#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_check_checker_mle_cpp() -> Result<(), Box<dyn Error>> {
create_files_check(
TARGET_FILE_CPP,
Expand Down Expand Up @@ -80,6 +84,7 @@ fn cmd_check_checker_mle_cpp() -> Result<(), Box<dyn Error>> {
}

#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_check_gen_mle_cpp() -> Result<(), Box<dyn Error>> {
create_files_check(
TARGET_FILE_CPP,
Expand Down
5 changes: 5 additions & 0 deletions tests/cli/cmp_subcommand/cpp_mle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* License: MIT (See the LICENSE file in the repository root directory)
*/

#![allow(unused_imports)]

use std::{error::Error, process::Command};

use assert_cmd::assert::OutputAssertExt;
Expand All @@ -21,6 +23,7 @@ use super::codes::{CORRECT_CPP_CMP, GEN_CPP_CMP, TARGET_CPP_CMP};

// CHECK MLE in Subcommand cmp
#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_cmp_target_mle_cpp() -> Result<(), Box<dyn Error>> {
create_files_cmp(
TARGET_FILE_CPP,
Expand Down Expand Up @@ -51,6 +54,7 @@ fn cmd_cmp_target_mle_cpp() -> Result<(), Box<dyn Error>> {
}

#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_cmp_correct_mle_cpp() -> Result<(), Box<dyn Error>> {
create_files_cmp(
TARGET_FILE_CPP,
Expand Down Expand Up @@ -81,6 +85,7 @@ fn cmd_cmp_correct_mle_cpp() -> Result<(), Box<dyn Error>> {
}

#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_cmp_gen_mle_cpp() -> Result<(), Box<dyn Error>> {
create_files_cmp(
TARGET_FILE_CPP,
Expand Down
3 changes: 3 additions & 0 deletions tests/cli/cmp_subcommand/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* License: MIT (See the LICENSE file in the repository root directory)
*/

#![allow(unused_imports)]

use std::{error::Error, process::Command};

use assert_cmd::assert::OutputAssertExt;
Expand All @@ -18,6 +20,7 @@ use crate::util::{
use super::codes::{CORRECT_RUST_CMP, GEN_RUST_CMP, TARGET_RUST_CMP};

#[test]
#[cfg(not(target_os = "macos"))]
fn cmp_target_cpp_correct_cpp_gen_rust() -> Result<(), Box<dyn Error>> {
create_files_cmp(
TARGET_FILE_RUST,
Expand Down
4 changes: 4 additions & 0 deletions tests/cli/cmp_subcommand/rust_ce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* License: MIT (See the LICENSE file in the repository root directory)
*/

#![allow(unused_imports)]

use std::{error::Error, process::Command};

use assert_cmd::assert::OutputAssertExt;
Expand Down Expand Up @@ -49,6 +51,7 @@ fn cmd_cmp_target_ce_rust() -> Result<(), Box<dyn Error>> {
}

#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_cmp_correct_ce_rust() -> Result<(), Box<dyn Error>> {
create_files_cmp(
TARGET_FILE_RUST,
Expand Down Expand Up @@ -78,6 +81,7 @@ fn cmd_cmp_correct_ce_rust() -> Result<(), Box<dyn Error>> {
}

#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_cmp_gen_ce_rust() -> Result<(), Box<dyn Error>> {
create_files_cmp(
TARGET_FILE_RUST,
Expand Down
4 changes: 4 additions & 0 deletions tests/cli/cmp_subcommand/rust_rte.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* License: MIT (See the LICENSE file in the repository root directory)
*/

#![allow(unused_imports)]

use std::{error::Error, process::Command};

use assert_cmd::assert::OutputAssertExt;
Expand All @@ -21,6 +23,7 @@ use super::codes::{CORRECT_RUST_CMP, GEN_RUST_CMP, TARGET_RUST_CMP};

// CHECK RTE in Subcommand cmp
#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_cmp_target_rte_rust() -> Result<(), Box<dyn Error>> {
create_files_cmp(
TARGET_FILE_RUST,
Expand Down Expand Up @@ -50,6 +53,7 @@ fn cmd_cmp_target_rte_rust() -> Result<(), Box<dyn Error>> {
}

#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_cmp_correct_rte_rust() -> Result<(), Box<dyn Error>> {
create_files_cmp(
TARGET_FILE_RUST,
Expand Down
4 changes: 4 additions & 0 deletions tests/cli/stress_subcommand/cpp_mle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* License: MIT (See the LICENSE file in the repository root directory)
*/

#![allow(unused_imports)]

use std::{error::Error, process::Command};

use assert_cmd::assert::OutputAssertExt;
Expand All @@ -18,6 +20,7 @@ use crate::util::{
use super::codes::{GEN_CPP_STRESS, TARGET_CPP_STRESS};

#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_stress_target_mle_cpp() -> Result<(), Box<dyn Error>> {
create_files_tle(
TARGET_FILE_CPP,
Expand All @@ -39,6 +42,7 @@ fn cmd_stress_target_mle_cpp() -> Result<(), Box<dyn Error>> {
}

#[test]
#[cfg(not(target_os = "macos"))]
fn cmd_stress_gen_mle_cpp() -> Result<(), Box<dyn Error>> {
create_files_tle(
TARGET_FILE_CPP,
Expand Down
Loading