Skip to content

Commit

Permalink
Expand Testing, Add Missing File, Try to Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
iguessthislldo committed Sep 21, 2023
1 parent b51cea5 commit 81e2111
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 8 deletions.
108 changes: 102 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12671,6 +12671,48 @@ jobs:
path: OpenDDS/build/ACE_TAO
- name: Install xerces
run: sudo apt-get -y install libxerces-c-dev
- name: Configure
run: |
cd OpenDDS
cmake -B build \
-DCMAKE_UNITY_BUILD=TRUE \
-DBUILD_SHARED_LIBS=TRUE \
-DCMAKE_BUILD_TYPE=Debug \
-DOPENDDS_SECURITY=TRUE \
-DOPENDDS_ACE_TAO_SRC=$GITHUB_WORKSPACE/OpenDDS/build/ACE_TAO \
-DOPENDDS_MPC=$GITHUB_WORKSPACE/MPC \
-DOPENDDS_BUILD_TESTS=TRUE \
-DOPENDDS_CMAKE_VERBOSE=all
- uses: ammaraskar/[email protected]
- name: Build
run: |
cd OpenDDS
cmake --build build -- -j $(getconf _NPROCESSORS_ONLN)
- name: Run Tests
run: |
cd OpenDDS
cmake --build build -t test
build_cmake_u22_stat:

runs-on: ubuntu-22.04

steps:
- name: Checkout OpenDDS
uses: actions/checkout@v3
with:
path: OpenDDS
submodules: true
- name: Checkout MPC
uses: actions/checkout@v3
with:
repository: DOCGroup/MPC
path: MPC
- name: Checkout ACE/TAO
uses: actions/checkout@v3
with:
repository: DOCGroup/ACE_TAO
path: OpenDDS/build/ACE_TAO
- name: Configure
run: |
cd OpenDDS
Expand Down Expand Up @@ -12712,14 +12754,15 @@ jobs:
with:
repository: DOCGroup/ACE_TAO
path: OpenDDS/build/ACE_TAO
- name: Install xerces
run: sudo apt-get -y install libxerces-c-dev
- name: Install Ninja
run: sudo apt-get -y install ninja-build
- name: Configure
run: |
cd OpenDDS
cmake -B build \
-G Ninja \
-DCMAKE_UNITY_BUILD=TRUE \
-DBUILD_SHARED_LIBS=FALSE \
-DBUILD_SHARED_LIBS=TRUE \
-DCMAKE_BUILD_TYPE=Debug \
-DOPENDDS_ACE_TAO_SRC=$GITHUB_WORKSPACE/OpenDDS/build/ACE_TAO \
-DOPENDDS_MPC=$GITHUB_WORKSPACE/MPC \
Expand All @@ -12734,7 +12777,7 @@ jobs:
- name: Build
run: |
cd OpenDDS
cmake --build build -- -j $(getconf _NPROCESSORS_ONLN)
cmake --build build
- name: Run Tests
run: |
cd OpenDDS
Expand Down Expand Up @@ -12764,8 +12807,8 @@ jobs:
with:
repository: DOCGroup/ACE_TAO
path: OpenDDS/build/ACE_TAO
- name: Install xerces
run: sudo apt-get -y install libxerces-c-dev
- name: Install Ninja
run: sudo apt-get -y install ninja-build
- name: Configure Host Tools
run: |
cd OpenDDS
Expand All @@ -12792,3 +12835,56 @@ jobs:
run: |
cd OpenDDS
cmake --build build-target
build_cmake_w22:

needs: ACE_TAO_w22_p1

- name: Checkout OpenDDS
uses: actions/checkout@v3
with:
path: OpenDDS
submodules: true
- name: Checkout MPC
uses: actions/checkout@v3
with:
repository: DOCGroup/MPC
path: MPC
- name: Checkout ACE_TAO
uses: actions/checkout@v3
with:
repository: DOCGroup/ACE_TAO
ref: ace6tao2
path: OpenDDS/ACE_TAO
- name: Download ACE_TAO artifact
uses: actions/download-artifact@v3
with:
name: ACE_TAO_w22_p1_artifact
path: OpenDDS/ACE_TAO
- name: Extract ACE_TAO artifact
shell: bash
run: |
cd OpenDDS/ACE_TAO
tar xvfJ ACE_TAO_w22_p1.tar.xz
rm -f ACE_TAO_w22_p1.tar.xz
- name: set up msvc env
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: |
cd OpenDDS
cmake -B build^
-DBUILD_SHARED_LIBS=TRUE^
-DCMAKE_BUILD_TYPE=Debug^
-DOPENDDS_ACE=${{ github.workspace }}/OpenDDS/ACE_TAO^
-DOPENDDS_MPC=${{ github.workspace }}/MPC^
-DOPENDDS_BUILD_TESTS=TRUE^
-DOPENDDS_CMAKE_VERBOSE=all
- uses: ammaraskar/[email protected]
- name: Build
run: |
cd OpenDDS
cmake --build build
- name: Run Tests
run: |
cd OpenDDS
cmake --build build -t RUN_TESTS
4 changes: 3 additions & 1 deletion bin/PerlDDS/Run_Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,10 @@ sub process {

my $subdir = $PerlACE::Process::ExeSubDir;
if (defined($ENV{CMAKE_CONFIG_TYPE})) {
$subdir = $ENV{CMAKE_CONFIG_TYPE};
$subdir = $ENV{CMAKE_CONFIG_TYPE} . (($^O eq 'MSWin32') ? '\\' : '/');
$PerlACE::Process::ExeSubDir = $subdir;
}

my $basename = File::Basename::basename($executable);
my $dirname = File::Basename::dirname($executable);
if (!defined(PerlDDS::get_executable($basename, $dirname, catdir($dirname, $subdir)))) {
Expand Down
2 changes: 1 addition & 1 deletion cmake/build_ace_tao.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(ace_ver "7.1.1")
set(configure_ace_tao_args)
if(WIN32)
set(ext "zip")
set(md5 "40d99f613047a15665c205dacf2e066e")
set(md5 "db6d014b6d5863090988204295a0f73e")
if(CMAKE_GENERATOR STREQUAL "Visual Studio 17 2022")
set(mpc_type vs2022)
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 16 2019")
Expand Down
79 changes: 79 additions & 0 deletions cmake/scrape_vs.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/usr/bin/perl

use strict;
use warnings;

use File::Spec;
use File::Basename;
use Cwd qw/realpath/;
use JSON::PP;
use Getopt::Long qw/GetOptions/;

my @required_values = qw/
sln
ace
/;
my @optional_values = qw/
/;
my %is_value_required = map {$_ => 1} @required_values;
my %values = ();
my @opts = ();
for my $key (@required_values, @optional_values) {
$values{$key} = undef;
push(@opts, "$key=s");
}
if (!GetOptions(\%values, @opts)) {
exit(1);
}

my $status = 0;
for my $name (keys(%values)) {
if (!defined($values{$name}) && $is_value_required{$name}) {
print STDERR ("Required option --$name was not passed\n");
$status = 1;
}
$values{$name} = realpath($values{$name});
}
exit($status) if ($status);

my %projects;

open(my $fh, $values{sln}) or die("Couldn't open \"$values{sln}\": $!");
while (my $line = <$fh>) {
$line =~ s/\s$//;
if ($line =~ /Project\("\{[^}]+\}"\) = "([^)]+)", "([^"]+)",.*/) {
my $name = $1;
my $pf = File::Spec->catfile(dirname($values{sln}), $2);

my $loc = undef;
open(my $pf_fh, $pf) or die("Couldn't open \"$pf\": $!");
while (my $pf_line = <$pf_fh>) {
$pf_line =~ s/\s$//;
if ($pf_line =~ /<OutputFile>(\$\(OutDir\))?(.*)<\/OutputFile>$/) {
my $out_dir = $1;
my $output_file = $2;
$output_file =~ s/d?.dll/d.dll/;
if ($out_dir) {
my $dir = $output_file =~ /.exe/ ? 'bin' : 'lib';
$loc = File::Spec->catfile($values{ace}, $dir, $output_file);
}
else {
$loc = File::Spec->catfile(dirname($pf), $output_file);
}
last;
}
}
if (!defined($loc)) {
print STDERR ("Didn't get OutputFile from $pf\n");
next;
}

print STDERR ("$name $pf $loc\n");
$projects{$name} = {
name => $name,
loc => $loc,
};
}
}

print(JSON::PP->new->pretty(0)->utf8->encode(\%projects));

0 comments on commit 81e2111

Please sign in to comment.