Skip to content

Commit

Permalink
PROTON-2644: Fix Github workflow build to remove deprecation warnings
Browse files Browse the repository at this point in the history
It looks like the MacOS image/python actions are fixed now

Also removed the work around for Proton-2295 as the go version on MacOS
is no longer a problem.
  • Loading branch information
astitcher committed Apr 17, 2024
1 parent 4287b7a commit c503244
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 29 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,12 @@ jobs:
PKG_CONFIG_PATH: ${{matrix.pkg_config_path}}
VCPKG_DEFAULT_TRIPLET: x64-windows
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Create Build and Install directories
run: mkdir -p "${BuildDir}" "${InstallPrefix}"
shell: bash

# PROTON-2295 avoid using go 1.15.3 on macOS, which is broken
- if: runner.os == 'macOS'
name: Setup go (Mac OS)
uses: actions/setup-go@v3
with:
go-version: '^1.15.4'

# PROTON-2644 upgrading setup-python to v4 breaks cmake discovery of openssl on macOS
- name: Setup python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
Expand Down Expand Up @@ -74,28 +65,33 @@ jobs:
run: cmake --build "${BuildDir}" --config ${BuildType} -t install
shell: bash
- name: Upload Install
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: qpid_proton_pkg_${{matrix.os}}_${{matrix.buildType}}
path: ${{env.InstallPrefix}}
- name: Upload python packages
uses: actions/upload-artifact@v3
- name: Upload python source
uses: actions/upload-artifact@v4
with:
name: python-src_${{matrix.os}}
path: ${{env.BuildDir}}/python/dist/*.tar.gz
- name: Upload python wheel
uses: actions/upload-artifact@v4
with:
name: python-pkgs
path: ${{env.BuildDir}}/python/dist
name: python-wheel_${{matrix.os}}
path: ${{env.BuildDir}}/python/dist/*.whl
- id: ctest
name: ctest
working-directory: ${{env.BuildDir}}
run: ctest -C ${BuildType} -V -T Test --no-compress-output ${{matrix.ctest_extra}}
shell: bash
- name: Upload Test results
if: always() && (steps.ctest.outcome == 'failure' || steps.ctest.outcome == 'success')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Test_Results_${{matrix.os}}_${{matrix.buildType}}
path: ${{env.BuildDir}}/Testing/**/*.xml
- name: Upload Python & C build directories on failure
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: Debug-python-C-BLD_${{matrix.os}}_${{matrix.buildType}}
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/proton/work_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class work {
/// **Unsettled API**
///
/// Execute the piece of work
void operator()() const { item_(); }
void operator()() { item_(); }

~work() = default;

Expand Down
13 changes: 3 additions & 10 deletions cpp/src/proactor_container_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,16 +542,9 @@ void container::impl::run_timer_jobs() {
// NB. We copied the due tasks in reverse order so execute from end

for (int i = tasks.size()-1; i>=0; --i) {
const auto& task = tasks[i];
bool active;

{
GUARD(deferred_lock_);
// NB. erase returns the number of items erased
active = is_active_.erase(task.w_handle);
}
if (active) {
task.task();
if(is_active_.count(tasks[i].w_handle)) {
tasks[i].task();
is_active_.erase(tasks[i].w_handle);
}
}
}
Expand Down

0 comments on commit c503244

Please sign in to comment.