From a2e3f3f240387297620112de1dd371c0596371fc Mon Sep 17 00:00:00 2001 From: Douglas James Butner Date: Wed, 13 Dec 2023 12:22:48 -0500 Subject: [PATCH 1/9] UPDATE Link to latest patch of CDT (4.0.1) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1a4ac3ee58..b226330e54 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ CDT currently supports Linux x86_64 Debian packages. Visit the [release page](ht Download the appropriate version of the Debian package and then install it. To download and install the latest version, run the following: ```sh -wget https://github.com/AntelopeIO/cdt/releases/download/v4.0.0/cdt_4.0.0_amd64.deb -sudo apt install ./cdt_4.0.0_amd64.deb +wget https://github.com/AntelopeIO/cdt/releases/download/v4.0.1/cdt_4.0.1_amd64.deb +sudo apt install ./cdt_4.0.1_amd64.deb ``` ### Debian package uninstall From 589faab1d0bd0e113a3bedf93cdd9c8596c9c1b5 Mon Sep 17 00:00:00 2001 From: Eric Passmore Date: Wed, 20 Dec 2023 18:22:55 -0800 Subject: [PATCH 2/9] Reverts operations to multi-index that created alias for existing operations This reverts commit 65f928fcde87eeaddb20ae8f684bceac74a3e902. --- libraries/eosiolib/contracts/eosio/multi_index.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/eosiolib/contracts/eosio/multi_index.hpp b/libraries/eosiolib/contracts/eosio/multi_index.hpp index 64dd85e227..5d2eb457d3 100644 --- a/libraries/eosiolib/contracts/eosio/multi_index.hpp +++ b/libraries/eosiolib/contracts/eosio/multi_index.hpp @@ -866,11 +866,11 @@ class multi_index auto secondary_keys = make_extractor_tuple::get_extractor_tuple(indices_type{}, obj); - uint64_t pk = to_raw_key(obj.primary_key()); + uint64_t pk = _multi_index_detail::to_raw_key(obj.primary_key()); updater( obj ); - eosio::check( pk == to_raw_key(obj.primary_key()), "updater cannot change primary key when modifying an object" ); + eosio::check( pk == _multi_index_detail::to_raw_key(obj.primary_key()), "updater cannot change primary key when modifying an object" ); size_t size = pack_size( obj ); //using malloc/free here potentially is not exception-safe, although WASM doesn't support exceptions From 5634784cd033b2bc9d35025f2f85e04251de911b Mon Sep 17 00:00:00 2001 From: Eric Passmore Date: Wed, 20 Dec 2023 18:24:47 -0800 Subject: [PATCH 3/9] Revert "Update tests to cover both const and non-const version of remove()" This reverts commit a1aae5f8d2d2c4e9de6f8344e22e46067cd03c52. --- .../unit/test_contracts/multi_index_tests.cpp | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/tests/unit/test_contracts/multi_index_tests.cpp b/tests/unit/test_contracts/multi_index_tests.cpp index 155d753a1b..8fa99e7f69 100644 --- a/tests/unit/test_contracts/multi_index_tests.cpp +++ b/tests/unit/test_contracts/multi_index_tests.cpp @@ -205,7 +205,7 @@ namespace _test_multi_index eosio::check(itr2 == table.end(), "idx64_general - table.erase()"); } - // insert, update and remove by iterator + // insert, update and delete by iterator { const uint64_t ssn = 421; auto new_person = table.insert(payer, [&](auto &r) @@ -224,7 +224,7 @@ namespace _test_multi_index eosio::check(itr2 == table.end(), "idx64_general - table.remove()"); } - // insert, update and remove by object + // insert, update and delete by object { const uint64_t ssn = 421; auto new_person = table.insert(payer, [&](auto &r) @@ -235,26 +235,7 @@ namespace _test_multi_index table.update(new_person, payer, [&](auto &r) { r.sec = "billy"_n.value; }); - const auto& person_object = table.get(ssn); - auto& mutable_person = const_cast(person_object); - table.remove(mutable_person); - auto itr2 = table.find(ssn); - eosio::check(itr2 == table.end(), "idx64_general - table.remove()"); - } - - // insert, update and remove by const object - { - const uint64_t ssn = 421; - auto new_person = table.insert(payer, [&](auto &r) - { - r.id = ssn; - r.sec = "bob"_n.value; }); - - table.update(new_person, payer, [&](auto &r) - { r.sec = "billy"_n.value; }); - - const auto& person_object = table.get(ssn); - table.remove(person_object); + table.remove(new_person); auto itr2 = table.find(ssn); eosio::check(itr2 == table.end(), "idx64_general - table.remove()"); } From 47e1b5175af541e67c3de5d1bb72f42d57be41de Mon Sep 17 00:00:00 2001 From: Eric Passmore Date: Wed, 20 Dec 2023 18:24:57 -0800 Subject: [PATCH 4/9] Revert "Get rid of const obj for new modify() method." This reverts commit 2b0fd5c55bd8ff32400ff0d65a8d461e226b8db0. --- .../eosiolib/contracts/eosio/multi_index.hpp | 106 +++++++++--------- 1 file changed, 50 insertions(+), 56 deletions(-) diff --git a/libraries/eosiolib/contracts/eosio/multi_index.hpp b/libraries/eosiolib/contracts/eosio/multi_index.hpp index 5d2eb457d3..2ae6ae0e0d 100644 --- a/libraries/eosiolib/contracts/eosio/multi_index.hpp +++ b/libraries/eosiolib/contracts/eosio/multi_index.hpp @@ -743,8 +743,8 @@ class multi_index } template - void update( T& obj, eosio::name payer, Lambda&& updater ) { - _multidx->update( obj, payer, std::forward(updater) ); + void update( const T& obj, eosio::name payer, Lambda&& updater ) { + modify( obj, payer, std::forward(updater) ); } const_iterator erase( const_iterator itr ) { @@ -855,56 +855,6 @@ class multi_index return *ptr; } /// load_object_by_primary_iterator - template - void modify_object(T& obj, name payer, Lambda&& updater) { - using namespace _multi_index_detail; - - auto& objitem = static_cast(obj); - eosio::check( objitem.__idx == this, "object passed to modify is not in multi_index" ); - - eosio::check( _code == current_receiver(), "cannot modify objects in table of another contract" ); // Quick fix for mutating db using multi_index that shouldn't allow mutation. Real fix can come in RC2. - - auto secondary_keys = make_extractor_tuple::get_extractor_tuple(indices_type{}, obj); - - uint64_t pk = _multi_index_detail::to_raw_key(obj.primary_key()); - - updater( obj ); - - eosio::check( pk == _multi_index_detail::to_raw_key(obj.primary_key()), "updater cannot change primary key when modifying an object" ); - - size_t size = pack_size( obj ); - //using malloc/free here potentially is not exception-safe, although WASM doesn't support exceptions - void* buffer = max_stack_buffer_size < size ? malloc(size) : alloca(size); - - datastream ds( (char*)buffer, size ); - ds << obj; - - internal_use_do_not_use::db_update_i64( objitem.__primary_itr, payer.value, buffer, size ); - - if ( max_stack_buffer_size < size ) { - free( buffer ); - } - - if( pk >= _next_primary_key ) - _next_primary_key = (pk >= no_available_primary_key) ? no_available_primary_key : (pk + 1); - - bluegrass::meta::for_each(indices_type{}, [&](auto idx){ - typedef std::tuple_element_t index_type; - auto secondary = index_type::extract_secondary_key( obj ); - if( memcmp( &std::get(secondary_keys), &secondary, sizeof(secondary) ) != 0 ) { - auto indexitr = objitem.__iters[index_type::number()]; - - if( indexitr < 0 ) { - typename index_type::secondary_key_type temp_secondary_key; - indexitr = objitem.__iters[index_type::number()] - = secondary_index_db_functions::db_idx_find_primary( _code.value, _scope, index_type::name(), pk, temp_secondary_key ); - } - - secondary_index_db_functions::db_idx_update( indexitr, payer.value, secondary ); - } - } ); - } - public: /** * Constructs an instance of a Multi-Index table. @@ -1855,9 +1805,53 @@ class multi_index */ template void modify( const T& obj, name payer, Lambda&& updater ) { - T& mutable_obj = const_cast(obj); + using namespace _multi_index_detail; + + const auto& objitem = static_cast(obj); + eosio::check( objitem.__idx == this, "object passed to modify is not in multi_index" ); + auto& mutableitem = const_cast(objitem); + eosio::check( _code == current_receiver(), "cannot modify objects in table of another contract" ); // Quick fix for mutating db using multi_index that shouldn't allow mutation. Real fix can come in RC2. + + auto secondary_keys = make_extractor_tuple::get_extractor_tuple(indices_type{}, obj); + + uint64_t pk = _multi_index_detail::to_raw_key(obj.primary_key()); + + auto& mutableobj = const_cast(obj); // Do not forget the auto& otherwise it would make a copy and thus not update at all. + updater( mutableobj ); + + eosio::check( pk == _multi_index_detail::to_raw_key(obj.primary_key()), "updater cannot change primary key when modifying an object" ); + + size_t size = pack_size( obj ); + //using malloc/free here potentially is not exception-safe, although WASM doesn't support exceptions + void* buffer = max_stack_buffer_size < size ? malloc(size) : alloca(size); + + datastream ds( (char*)buffer, size ); + ds << obj; + + internal_use_do_not_use::db_update_i64( objitem.__primary_itr, payer.value, buffer, size ); + + if ( max_stack_buffer_size < size ) { + free( buffer ); + } - modify_object(mutable_obj, payer, std::forward(updater)); + if( pk >= _next_primary_key ) + _next_primary_key = (pk >= no_available_primary_key) ? no_available_primary_key : (pk + 1); + + bluegrass::meta::for_each(indices_type{}, [&](auto idx){ + typedef std::tuple_element_t index_type; + auto secondary = index_type::extract_secondary_key( obj ); + if( memcmp( &std::get(secondary_keys), &secondary, sizeof(secondary) ) != 0 ) { + auto indexitr = mutableitem.__iters[index_type::number()]; + + if( indexitr < 0 ) { + typename index_type::secondary_key_type temp_secondary_key; + indexitr = mutableitem.__iters[index_type::number()] + = secondary_index_db_functions::db_idx_find_primary( _code.value, _scope, index_type::name(), pk, temp_secondary_key ); + } + + secondary_index_db_functions::db_idx_update( indexitr, payer.value, secondary ); + } + } ); } /** @@ -1902,8 +1896,8 @@ class multi_index * @endcode */ template - void update( T& obj, name payer, Lambda&& updater ) { - modify_object(obj, payer, std::forward(updater)); + void update( const T& obj, name payer, Lambda&& updater ) { + modify(obj, payer, std::forward(updater)); } /** From d31c73a65b91d531647840bf585d5f8afefa14f5 Mon Sep 17 00:00:00 2001 From: Eric Passmore Date: Wed, 20 Dec 2023 18:25:02 -0800 Subject: [PATCH 5/9] Revert "Add insert, remove and update methods to multi_index (and index)" This reverts commit 94ca0508dddd1d1d0d93847088e3b49ca0ce00f2. --- .../eosiolib/contracts/eosio/multi_index.hpp | 224 ------------------ .../unit/test_contracts/multi_index_tests.cpp | 35 --- 2 files changed, 259 deletions(-) diff --git a/libraries/eosiolib/contracts/eosio/multi_index.hpp b/libraries/eosiolib/contracts/eosio/multi_index.hpp index 2ae6ae0e0d..2b06384aac 100644 --- a/libraries/eosiolib/contracts/eosio/multi_index.hpp +++ b/libraries/eosiolib/contracts/eosio/multi_index.hpp @@ -732,21 +732,11 @@ class multi_index _multidx->modify( *itr, payer, std::forward(updater) ); } - template - void update( const_iterator itr, eosio::name payer, Lambda&& updater ) { - modify( itr, payer, std::forward(updater) ); - } - template void modify( const T& obj, eosio::name payer, Lambda&& updater ) { _multidx->modify( obj, payer, std::forward(updater) ); } - template - void update( const T& obj, eosio::name payer, Lambda&& updater ) { - modify( obj, payer, std::forward(updater) ); - } - const_iterator erase( const_iterator itr ) { eosio::check( itr != cend(), "cannot pass end iterator to erase" ); @@ -758,10 +748,6 @@ class multi_index return itr; } - const_iterator remove( const_iterator itr ) { - return erase(itr); - } - eosio::name get_code()const { return _multidx->get_code(); } uint64_t get_scope()const { return _multidx->get_scope(); } @@ -1545,7 +1531,6 @@ class multi_index eosio::check( objitem.__idx == this, "object passed to iterator_to is not in multi_index" ); return {this, &objitem}; } - /** * Adds a new object (i.e., row) to the table. * @ingroup multiindex @@ -1628,48 +1613,6 @@ class multi_index return {this, ptr}; } - /** - * Adds a new object (i.e., row) to the table, alias for emplace() - * @ingroup multiindex - * - * @param payer - Account name of the payer for the Storage usage of the new object - * @param constructor - Lambda function that does an in-place initialization of the object to be created in the table - * - * @pre A multi index table has been instantiated - * @post A new object is created in the Multi-Index table, with a unique primary key (as specified in the object). The object is serialized and written to the table. If the table does not exist, it is created. - * @post Secondary indices are updated to refer to the newly added object. If the secondary index tables do not exist, they are created. - * @post The payer is charged for the storage usage of the new object and, if the table (and secondary index tables) must be created, for the overhead of the table creation. - * - * @return A primary key iterator to the newly created object - * - * Exception - The account is not authorized to write to the table. - * - * Example: - * - * @code - * // This assumes the code from the constructor example. Replace myaction() {...} - * - * void myaction() { - * address_index addresses(_self, _self.value); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.insert(_self, [&](auto& address) { - * address.account_name = "dan"_n; - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * } - * } - * EOSIO_DISPATCH( addressbook, (myaction) ) - * @endcode - */ - template - const_iterator insert( name payer, Lambda&& constructor ) { - return emplace(payer, std::forward(constructor)); - } - /** * Modifies an existing object in a table. * @ingroup multiindex @@ -1717,51 +1660,6 @@ class multi_index modify( *itr, payer, std::forward(updater) ); } - /** - * Updates an existing object in a table, alias for modify() - * @ingroup multiindex - * - * @param itr - an iterator pointing to the object to be updated - * @param payer - account name of the payer for the storage usage of the updated row - * @param updater - lambda function that updates the target object - * - * @pre itr points to an existing element - * @pre payer is a valid account that is authorized to execute the action and be billed for storage usage. - * - * @post The updated object is serialized, then replaces the existing object in the table. - * @post Secondary indices are updated; the primary key of the updated object is not changed. - * @post The payer is charged for the storage usage of the updated object. - * @post If payer is the same as the existing payer, payer only pays for the usage difference between existing and updated object (and is refunded if this difference is negative). - * @post If payer is different from the existing payer, the existing payer is refunded for the storage usage of the existing object. - * - * Exceptions: - * If called with an invalid precondition, execution is aborted. - * - * Example: - * - * @code - * // This assumes the code from the constructor example. Replace myaction() {...} - * - * void myaction() { - * // create reference to address_index - see emplace example - * // add dan account to table - see emplace example - * - * auto itr = addresses.find("dan"_n); - * eosio::check(itr != addresses.end(), "Address for account not found"); - * addresses.update( itr, account payer, [&]( auto& address ) { - * address.city = "San Luis Obispo"; - * address.state = "CA"; - * }); - * } - * } - * EOSIO_DISPATCH( addressbook, (myaction) ) - * @endcode - */ - template - void update( const_iterator itr, name payer, Lambda&& updater ) { - modify( itr, payer, std::forward(updater) ); - } - /** * Modifies an existing object in a table. * @ingroup multiindex @@ -1854,52 +1752,6 @@ class multi_index } ); } - /** - * Updates an existing object in a table, alias for modify() - * @ingroup multiindex - * - * @param obj - a reference to the object to be updated - * @param payer - account name of the payer for the storage usage of the updated row - * @param updater - lambda function that updates the target object - * - * @pre obj is an existing object in the table - * @pre payer is a valid account that is authorized to execute the action and be billed for storage usage. - * - * @post The modified object is serialized, then replaces the existing object in the table. - * @post Secondary indices are updated; the primary key of the updated object is not changed. - * @post The payer is charged for the storage usage of the updated object. - * @post If payer is the same as the existing payer, payer only pays for the usage difference between existing and updated object (and is refunded if this difference is negative). - * @post If payer is different from the existing payer, the existing payer is refunded for the storage usage of the existing object. - * - * Exceptions: - * If called with an invalid precondition, execution is aborted. - * - * Example: - * - * @code - * // This assumes the code from the constructor example. Replace myaction() {...} - * - * void myaction() { - * // create reference to address_index - see emplace example - * // add dan account to table - see emplace example - * - * auto itr = addresses.find("dan"_n); - * eosio::check(itr != addresses.end(), "Address for account not found"); - * addresses.update( *itr, payer, [&]( auto& address ) { - * address.city = "San Luis Obispo"; - * address.state = "CA"; - * }); - * eosio::check(itr->city == "San Luis Obispo", "Lock arf, Address not modified"); - * } - * } - * EOSIO_DISPATCH( addressbook, (myaction) ) - * @endcode - */ - template - void update( const T& obj, name payer, Lambda&& updater ) { - modify(obj, payer, std::forward(updater)); - } - /** * Retrieves an existing object from a table using its primary key. * @ingroup multiindex @@ -2050,46 +1902,6 @@ class multi_index return itr; } - /** - * Deletes an existing object from a table using its primary key, alias for erase() - * @ingroup multiindex - * - * @param itr - An iterator pointing to the object to be removed - * - * @pre itr points to an existing element - * @post The object is removed from the table and all associated storage is reclaimed. - * @post Secondary indices associated with the table are updated. - * @post The existing payer for storage usage of the object is refunded for the table and secondary indices usage of the removed object, and if the table and indices are removed, for the associated overhead. - * - * @return For the signature with `const_iterator`, returns a pointer to the object following the removed object. - * - * Exceptions: - * The object to be removed is not in the table. - * The action is not authorized to modify the table. - * The given iterator is invalid. - * - * Example: - * - * @code - * // This assumes the code from the constructor example. Replace myaction() {...} - * - * void myaction() { - * // create reference to address_index - see emplace example - * // add dan account to table - see emplace example - * - * auto itr = addresses.find("dan"_n); - * eosio::check(itr != addresses.end(), "Address for account not found"); - * addresses.delete( itr ); - * eosio::check(itr != addresses.end(), "Everting lock arf, Address not erased properly"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_iterator remove( const_iterator itr ) { - return erase(itr); - } - /** * Remove an existing object from a table using its primary key. * @ingroup multiindex @@ -2153,41 +1965,5 @@ class multi_index _items_vector.erase(--(itr2.base())); } -/** - * Remove an existing object from a table using its primary key, alias for erase() - * @ingroup multiindex - * - * @param obj - Object to be removed - * - * @pre obj is an existing object in the table - * @post The object is removed from the table and all associated storage is reclaimed. - * @post Secondary indices associated with the table are updated. - * @post The existing payer for storage usage of the object is refunded for the table and secondary indices usage of the removed object, and if the table and indices are removed, for the associated overhead. - * - * Exceptions: - * The object to be removed is not in the table. - * The action is not authorized to modify the table. - * The given iterator is invalid. - * - * Example: - * - * @code - * // This assumes the code from the constructor example. Replace myaction() {...} - * - * void myaction() { - * auto itr = addresses.find("dan"_n); - * eosio::check(itr != addresses.end(), "Record is not found"); - * addresses.remove(*itr); - * itr = addresses.find("dan"_n); - * eosio::check(itr == addresses.end(), "Record is not deleted"); - * } - * } - * EOSIO_DISPATCH( addressbook, (myaction) ) - * @endcode - */ - void remove( const T& obj ) { - erase(obj); - } - }; } /// eosio diff --git a/tests/unit/test_contracts/multi_index_tests.cpp b/tests/unit/test_contracts/multi_index_tests.cpp index 8fa99e7f69..8c62358081 100644 --- a/tests/unit/test_contracts/multi_index_tests.cpp +++ b/tests/unit/test_contracts/multi_index_tests.cpp @@ -204,41 +204,6 @@ namespace _test_multi_index auto itr2 = table.find(ssn); eosio::check(itr2 == table.end(), "idx64_general - table.erase()"); } - - // insert, update and delete by iterator - { - const uint64_t ssn = 421; - auto new_person = table.insert(payer, [&](auto &r) - { - r.id = ssn; - r.sec = "bob"_n.value; }); - - table.update(new_person, payer, [&](auto &r) - { r.sec = "billy"_n.value; }); - - auto itr1 = table.find(ssn); - eosio::check(itr1 != table.end() && itr1->sec == "billy"_n.value, "idx64_general - table.update()"); - - table.remove(itr1); - auto itr2 = table.find(ssn); - eosio::check(itr2 == table.end(), "idx64_general - table.remove()"); - } - - // insert, update and delete by object - { - const uint64_t ssn = 421; - auto new_person = table.insert(payer, [&](auto &r) - { - r.id = ssn; - r.sec = "bob"_n.value; }); - - table.update(new_person, payer, [&](auto &r) - { r.sec = "billy"_n.value; }); - - table.remove(new_person); - auto itr2 = table.find(ssn); - eosio::check(itr2 == table.end(), "idx64_general - table.remove()"); - } } template From 3b07180665ff8ed726439b7069bcc5c3a3c02228 Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Mon, 8 Jan 2024 20:44:19 -0500 Subject: [PATCH 6/9] export wasm memory --- tools/include/compiler_options.hpp.in | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/compiler_options.hpp.in b/tools/include/compiler_options.hpp.in index e94e8d57e2..0547701ce1 100644 --- a/tools/include/compiler_options.hpp.in +++ b/tools/include/compiler_options.hpp.in @@ -508,6 +508,7 @@ static void GetLdDefaults(std::vector& ldopts) { else ldopts.insert(ldopts.end(), { "-e", "apply" }); ldopts.insert(ldopts.end(), { "--only-export", "apply:function" }); + ldopts.insert(ldopts.end(), { "--only-export", "*:memory" }); } ldopts.emplace_back("-lc++"); ldopts.emplace_back("-lc"); From fd49c7b08cb08eedfef3c329b488b67f92ea7d57 Mon Sep 17 00:00:00 2001 From: Eric Passmore Date: Thu, 15 Feb 2024 08:55:56 -0800 Subject: [PATCH 7/9] updated build&test to use ubuntu22 leap --- .github/workflows/build.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7f70ff46a8..cadb8b2815 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -102,8 +102,8 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - name: Download leap-dev.deb (Ubuntu 20 only) - if: matrix.platform == 'ubuntu20' + - name: Download leap-dev.deb (Ubuntu 22 only) + if: matrix.platform == 'ubuntu22' uses: AntelopeIO/asset-artifact-download-action@v3 with: owner: AntelopeIO @@ -111,10 +111,10 @@ jobs: file: 'leap-dev.*(x86_64|amd64).deb' target: '${{needs.versions.outputs.leap-dev-target}}' prereleases: ${{fromJSON(needs.versions.outputs.leap-dev-prerelease)}} - artifact-name: leap-dev-ubuntu20-amd64 + artifact-name: leap-dev-ubuntu22-amd64 container-package: experimental-binaries - - name: Install leap-dev.deb (Ubuntu 20 only) - if: matrix.platform == 'ubuntu20' + - name: Install leap-dev.deb (Ubuntu 22 only) + if: matrix.platform == 'ubuntu22' run: | apt-get update && apt-get upgrade -y apt install -y ./leap-dev*.deb @@ -127,13 +127,13 @@ jobs: make -j $(nproc) cd tests ctest -j $(nproc) --output-on-failure - - name: Package (Ubuntu 20 only) - if: matrix.platform == 'ubuntu20' + - name: Package (Ubuntu 22 only) + if: matrix.platform == 'ubuntu22' run: | cd build/packages bash generate_package.sh deb ubuntu amd64 - - name: Upload (Ubuntu 20 only) - if: matrix.platform == 'ubuntu20' + - name: Upload (Ubuntu 22 only) + if: matrix.platform == 'ubuntu22' uses: actions/upload-artifact@v3 with: name: cdt_ubuntu_package_amd64 From b8b9318784d37134597228ea63ad9a5bd54038bd Mon Sep 17 00:00:00 2001 From: Eric Passmore Date: Fri, 16 Feb 2024 19:03:47 -0800 Subject: [PATCH 8/9] specify os version in leap dev download file --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cadb8b2815..0e0f0581d5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -108,7 +108,7 @@ jobs: with: owner: AntelopeIO repo: leap - file: 'leap-dev.*(x86_64|amd64).deb' + file: 'file: leap-dev.*ubuntu22\.04_amd64.deb' target: '${{needs.versions.outputs.leap-dev-target}}' prereleases: ${{fromJSON(needs.versions.outputs.leap-dev-prerelease)}} artifact-name: leap-dev-ubuntu22-amd64 From 0d42f9bc77c4c8468d62ba2c670fdb27219d668a Mon Sep 17 00:00:00 2001 From: Eric Passmore Date: Fri, 16 Feb 2024 19:04:19 -0800 Subject: [PATCH 9/9] specify os version in leap dev download file --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0e0f0581d5..c40b699527 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -108,7 +108,7 @@ jobs: with: owner: AntelopeIO repo: leap - file: 'file: leap-dev.*ubuntu22\.04_amd64.deb' + file: 'leap-dev.*ubuntu22\.04_amd64.deb' target: '${{needs.versions.outputs.leap-dev-target}}' prereleases: ${{fromJSON(needs.versions.outputs.leap-dev-prerelease)}} artifact-name: leap-dev-ubuntu22-amd64