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

Build on MacOS #42

Merged
merged 1 commit into from
Aug 25, 2022
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
18 changes: 10 additions & 8 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
test: false
cmake: "emcmake cmake"

#- name: "MacOS clang"
#os: macos-latest
#cc: clang
#cxx: clang++
#test: true
#cmake: cmake
- name: "MacOS GCC"
os: macos-latest
cc: /usr/local/opt/gcc/bin/gcc-11
cxx: /usr/local/opt/gcc/bin/g++-11
test: true
cmake: cmake

#- name: "Windows MSVC"
#os: windows-latest
Expand Down Expand Up @@ -74,9 +74,11 @@ jobs:
with:
boost_version: 1.73.0

- name: "Install boost for macOS"
- name: "Install dependencies for macOS"
if: runner.os == 'macOS'
run: brew install boost
run: |
brew install gcc
brew install boost

- name: "Setup Emscripten"
if: ${{ matrix.cc == 'emcc' }}
Expand Down
8 changes: 3 additions & 5 deletions src/input_output_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void ParseDirectoryName(std::string name,
parts.push_back(name.substr(left, right - left));

*translator_name = parts[0];
for(int i = 1; i<parts.size(); ++i) {
for (int i = 1; i < parts.size(); ++i) {
*options += parts[i] + "\n";
}
}
Expand Down Expand Up @@ -64,17 +64,15 @@ int main(int, const char**) {
std::string output_computed = translator->Translate(input, options);

if (output_computed == output) {
std::cout << " [PASS] " << test << std::endl;
std::cout << " [PASS] " << test.path() << std::endl;
} else {
std::cout << " [FAIL] " << test << std::endl;
std::cout << " [FAIL] " << test.path() << std::endl;
std::cout << "---[Output]------------------" << std::endl;
std::cout << output_computed << std::endl;
std::cout << "---[Expected]----------------" << std::endl;
std::cout << output << std::endl;
std::cout << "---------------------" << std::endl;
result = EXIT_FAILURE;

//std::ofstream(test.path() / "output") << output_computed;
}
}
}
Expand Down