diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index d071f751504..dba596d980c 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -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/gcc-problem-matcher@0.2.0 + - 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 @@ -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 \ @@ -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 @@ -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 @@ -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/msvc-problem-matcher@0.2.0 + - name: Build + run: | + cd OpenDDS + cmake --build build + - name: Run Tests + run: | + cd OpenDDS + cmake --build build -t RUN_TESTS diff --git a/bin/PerlDDS/Run_Test.pm b/bin/PerlDDS/Run_Test.pm index 42a43625e52..cf1126496a7 100644 --- a/bin/PerlDDS/Run_Test.pm +++ b/bin/PerlDDS/Run_Test.pm @@ -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)))) { diff --git a/cmake/build_ace_tao.cmake b/cmake/build_ace_tao.cmake index d153f669860..4c1a3c306a2 100644 --- a/cmake/build_ace_tao.cmake +++ b/cmake/build_ace_tao.cmake @@ -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") diff --git a/cmake/scrape_vs.pl b/cmake/scrape_vs.pl new file mode 100644 index 00000000000..a54bddcb843 --- /dev/null +++ b/cmake/scrape_vs.pl @@ -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 =~ /(\$\(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));