Skip to content

Commit

Permalink
Merge pull request #166 from NREL/develop
Browse files Browse the repository at this point in the history
Develop to main for 2023.12.17
  • Loading branch information
brtietz authored Dec 13, 2023
2 parents 465fe8d + a757117 commit 8c1ebd3
Show file tree
Hide file tree
Showing 16 changed files with 1,360 additions and 333 deletions.
103 changes: 20 additions & 83 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ on:
pull_request:

jobs:
build-on-ubuntu1804:
runs-on: ubuntu-18.04
env:
RUNS_ON: ubuntu1804
GH_WORKSPACE: /home/runner/work/wex/wex #= $GITHUB_WORKSPACE
build-on-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Setup cmake
uses: jwlawson/[email protected]
Expand All @@ -19,7 +16,7 @@ jobs:
run: cmake --version
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get update --fix-missing
sudo apt-get install -y \
build-essential \
freeglut3-dev \
Expand Down Expand Up @@ -64,92 +61,32 @@ jobs:
cd $GITHUB_WORKSPACE/lk
cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug
cmake --build build_linux -- -j
- name: Set LKDIR and LKD_LIB envs
- name: Set LKDIR
run: |
echo "LKDIR=$GITHUB_WORKSPACE/lk" >>$GITHUB_ENV
echo "LKD_LIB=$GITHUB_WORKSPACE/lk/build_linux" >>$GITHUB_ENV # iff CMAKE_BUILD_TYPE=Debug
- name: Checkout
uses: actions/checkout@v2
with:
path: wex
- name: Build WEX
- name: Set LKD_LIB
run: |
cd $GITHUB_WORKSPACE/wex
cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug
cmake --build build_linux
- name: Save static lib, Dview & wexsandbox
uses: actions/upload-artifact@v2
with:
name: WEX-${{ env.RUNS_ON }}-x86_64
path: |
${{ env.GH_WORKSPACE }}/wex/build_linux/tools/DView*
${{ env.GH_WORKSPACE }}/wex/build_linux/tools/wexsandbox*
${{ env.GH_WORKSPACE }}/wex/build_linux/wex*.a
build-on-ubuntu2004:
runs-on: ubuntu-20.04
env:
RUNS_ON: ubuntu2004
GH_WORKSPACE: /home/runner/work/wex/wex #= $GITHUB_WORKSPACE
steps:
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.24.x'
- name: Test cmake version
run: cmake --version
- name: Install OS dependencies
echo "LKD_LIB=$GITHUB_WORKSPACE/lk/build_linux" >>$GITHUB_ENV
- name: Set RAPIDJSONDIR
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
freeglut3-dev \
g++ \
libcurl4-openssl-dev \
libfontconfig-dev \
libgl1-mesa-dev \
libgtk2.0-dev \
mesa-common-dev \
unzip
- name: Get GCC version
run: gcc --version
- name: Get libc version
run: ldd --version

- name: Install wxWidgets
echo "RAPIDJSONDIR=$GITHUB_WORKSPACE/ssc" >>$GITHUB_ENV
- name: Get git ref of sibling dependency SSC
run: |
sudo apt-get install -y libwxgtk*-dev
sudo ln -s $(which wx-config) /usr/local/bin/wx-config-3
wx-config-3 --cflags | grep I
- name: Get git ref of sibling dependency LK
run: |
ref=$(git ls-remote --exit-code git://github.com/NREL/lk.git refs/heads/develop | awk '{print $1}')
echo "ref_of_lk=$ref" | tee --append $GITHUB_ENV
- name: Get cached build data of sibling dependency LK
ref=$(git ls-remote --exit-code git://github.com/NREL/ssc.git refs/heads/develop | awk '{print $1}')
echo "ref_of_ssc=$ref" | tee --append $GITHUB_ENV
- name: Get cached build data of sibling dependency SSC
uses: actions/cache@v2
id: cachedlk
id: cachedssc
with:
path: ${{ env.GH_WORKSPACE }}/lk
key: ${{ env.RUNS_ON }}-${{ env.ref_of_lk }}-LK
- name: Clone sibling dependency LK
if: steps.cachedlk.outputs.cache-hit != 'true'
path: ${{ env.GH_WORKSPACE }}/ssc
key: ${{ env.RUNS_ON }}-${{ env.ref_of_ssc }}-SSC
- name: Clone sibling dependency SSC
if: steps.cachedssc.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
ref: ${{ env.ref_of_lk }}
path: lk
repository: NREL/lk
- name: Build LK
if: steps.cachedlk.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/lk
cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug
cmake --build build_linux -- -j
- name: Set LKDIR and LKD_LIB envs
run: |
echo "LKDIR=$GITHUB_WORKSPACE/lk" >>$GITHUB_ENV
echo "LKD_LIB=$GITHUB_WORKSPACE/lk/build_linux" >>$GITHUB_ENV # iff CMAKE_BUILD_TYPE=Debug
ref: ${{ env.ref_of_ssc }}
path: ssc
repository: NREL/ssc

- name: Checkout
uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ endif ()
#
#####################################################################################################################

# for rapidjson folder
include_directories($ENV{RAPIDJSONDIR})

add_subdirectory(src)
if (NOT SAM_SKIP_TOOLS)
add_subdirectory(tools)
Expand Down
2 changes: 2 additions & 0 deletions include/wex/dview/dvselectionlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class wxDVSelectionListCtrl : public wxScrolledWindow, public wxDVAutoColourAssi

int Append(const wxString &name, const wxString &group = wxEmptyString); // returns row index
int AppendNoUpdate(const wxString &name, const wxString &group);
int AppendNoUpdate(const wxString& name, const wxString& group, const wxString& hybrid_bin);

void
Append(const wxArrayString &names, const wxString &group = wxEmptyString); // add a whole list with the same group
Expand Down Expand Up @@ -138,6 +139,7 @@ class wxDVSelectionListCtrl : public wxScrolledWindow, public wxDVAutoColourAssi
wxColour color;
wxString label;
wxString group;
wxString hybrid_bin = "";
bool value[NMAXCOLS];
bool enable[NMAXCOLS];
wxRect geom[NMAXCOLS]; // filled in by renderer
Expand Down
17 changes: 1 addition & 16 deletions include/wex/easycurl.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class wxEasyCurl : public wxObject {

static void Shutdown();

static void SetApiKeys(const wxString &google_key, const wxString &bing_key, const wxString &developer);
//static void SetApiKeys(const wxString &google_key, const wxString &bing_key, const wxString &developer);

static void SetUrlEscape(const wxString &key, const wxString &value);

Expand All @@ -115,21 +115,6 @@ class wxEasyCurl : public wxObject {

static wxArrayString GetProxyAutodetectMessages();

// geocoding function using google APIs.
// call is synchronous. Optionally determine time
// zone from lat/lon using second service call
static bool GeoCodeGoogle(const wxString &address,
double *lat, double *lon, double *tz = 0, bool showprogress = true);

static bool GeoCodeDeveloper(const wxString &address,
double *lat, double *lon, double *tz = 0, bool showprogress = true);

enum MapProvider {
GOOGLE_MAPS, BING_MAPS
};

static wxBitmap StaticMap(double lat, double lon, int zoom, MapProvider service = BING_MAPS);

wxEasyCurl(wxEvtHandler *handler = 0, int id = wxID_ANY);

virtual ~wxEasyCurl();
Expand Down
Loading

0 comments on commit 8c1ebd3

Please sign in to comment.