diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index fb7df7277..c670a0f2f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -41,12 +41,6 @@ jobs: os: [macos-13, macos-14, macos-15] compiler: [g++-13, g++-14, clang++] include: - - os: macos-13 - architecture: x64 - - os: macos-14 - architecture: arm64 - - os: macos-15 - architecture: arm64 - compiler: clang++ ccompiler: clang - compiler: g++-13 @@ -101,10 +95,6 @@ jobs: uses: cda-tum/setup-z3@v1 with: version: ${{env.Z3_VERSION}} - platform: macOS - architecture: ${{matrix.architecture}} - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} # Build and test pipeline for Debug mode - name: Create Build Environment (Debug) diff --git a/.github/workflows/pyfiction-pypi-deployment.yml b/.github/workflows/pyfiction-pypi-deployment.yml index 24ab84f01..ec274f760 100644 --- a/.github/workflows/pyfiction-pypi-deployment.yml +++ b/.github/workflows/pyfiction-pypi-deployment.yml @@ -83,7 +83,8 @@ jobs: strategy: fail-fast: false matrix: - runs-on: [ubuntu-latest, macos-13, macos-14, windows-latest] + runs-on: + [ubuntu-24.04, ubuntu-24.04-arm, macos-13, macos-14, windows-latest] steps: - uses: actions/checkout@v4 @@ -95,6 +96,7 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 - name: Setup ccache + if: matrix.runs-on != 'ubuntu-24.04-arm' uses: hendrikmuhs/ccache-action@v1.2 with: key: "${{matrix.config.os}}-pyfiction" @@ -124,7 +126,7 @@ jobs: - name: Upload wheel as an artifact uses: actions/upload-artifact@v4 with: - name: cibw-wheels-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ matrix.python }} + name: cibw-wheels-${{ matrix.config.os }} path: ./wheelhouse/*.whl overwrite: true diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 332710a42..7239cd9ba 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -38,7 +38,7 @@ jobs: build_and_test: strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04] + os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm] compiler: [g++-11, g++-12, g++-13, clang++-14, clang++-15, clang++-16] exclude: - os: ubuntu-22.04 @@ -47,6 +47,14 @@ jobs: compiler: clang++-16 - os: ubuntu-24.04 compiler: clang++-14 + - os: ubuntu-24.04-arm + compiler: g++-11 + - os: ubuntu-24.04-arm + compiler: g++-12 + - os: ubuntu-24.04-arm + compiler: g++-13 + - os: ubuntu-24.04-arm + compiler: clang++-14 include: - os: ubuntu-22.04 compiler: g++-10 @@ -56,12 +64,12 @@ jobs: compiler: clang++-17 - os: ubuntu-24.04 compiler: clang++-18 - - os: ubuntu-20.04 - compiler: g++-10 - cppstandard: -DCMAKE_CXX_STANDARD=20 - cppname: C++20 + - os: ubuntu-24.04-arm + compiler: clang++-17 + - os: ubuntu-24.04-arm + compiler: clang++-18 - name: 🐧 ${{matrix.os}} with ${{matrix.compiler}} ${{matrix.cppname}} + name: 🐧 ${{matrix.os}} with ${{matrix.compiler}} runs-on: ${{matrix.os}} steps: @@ -74,6 +82,8 @@ jobs: submodules: recursive - name: Setup ccache + # ccache is not supported on ARM yet + if: matrix.os != 'ubuntu-24.04-arm' uses: hendrikmuhs/ccache-action@v1.2 with: key: "${{matrix.os}}-${{matrix.compiler}}" @@ -96,6 +106,7 @@ jobs: uses: rui314/setup-mold@v1 - name: Setup Z3 Solver + if: matrix.os != 'ubuntu-24.04-arm' id: z3 uses: cda-tum/setup-z3@v1 with: @@ -122,7 +133,7 @@ jobs: -DFICTION_TEST=ON -DFICTION_BENCHMARK=OFF -DFICTION_EXPERIMENTS=ON - -DFICTION_Z3=ON + ${{ matrix.os != 'ubuntu-24.04-arm' && '-DFICTION_Z3=ON' || '' }} -DFICTION_ENABLE_MUGEN=ON -DFICTION_PROGRESS_BARS=OFF -DFICTION_WARNINGS_AS_ERRORS=OFF @@ -134,7 +145,7 @@ jobs: - name: Test (Debug) working-directory: ${{github.workspace}}/build_debug - run: ctest -C Debug --verbose --output-on-failure --repeat until-pass:3 --parallel 4 --exclude-regex "quality" + run: ctest -C Debug --verbose --output-on-failure --repeat until-pass:3 --parallel 4 # Build and test pipeline for Release mode @@ -153,7 +164,7 @@ jobs: -DFICTION_TEST=ON -DFICTION_BENCHMARK=OFF -DFICTION_EXPERIMENTS=ON - -DFICTION_Z3=ON + ${{ matrix.os != 'ubuntu-24.04-arm' && '-DFICTION_Z3=ON' || '' }} -DFICTION_ENABLE_MUGEN=ON -DFICTION_PROGRESS_BARS=OFF -DFICTION_WARNINGS_AS_ERRORS=OFF diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 78bc4fd5c..35564809c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -82,10 +82,6 @@ jobs: uses: cda-tum/setup-z3@v1 with: version: ${{env.Z3_VERSION}} - platform: windows - architecture: x64 - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} # Build and test pipeline for Debug mode diff --git a/include/fiction/io/dot_drawers.hpp b/include/fiction/io/dot_drawers.hpp index 9e6a4021e..a14759b4c 100644 --- a/include/fiction/io/dot_drawers.hpp +++ b/include/fiction/io/dot_drawers.hpp @@ -556,12 +556,12 @@ class simple_gate_layout_tile_drawer : public technology_dot_drawer& rank) const noexcept + [[nodiscard]] static std::string same_rank(const std::vector& rank) noexcept { return fmt::format("rank = same {{ {} }};\n", fmt::join(rank, " -> ")); } - [[nodiscard]] std::string edge(const std::string_view& src, const std::string_view& tgt) const noexcept + [[nodiscard]] static std::string edge(const std::string_view& src, const std::string_view& tgt) noexcept { return fmt::format("{} -> {};\n", src, tgt); } @@ -995,7 +995,7 @@ class gate_layout_hexagonal_drawer : public simple_gate_layout_tile_drawer; - [[nodiscard]] std::string invisible_node(const uint64_t i) const noexcept + [[nodiscard]] static std::string invisible_node(const uint64_t i) noexcept { return fmt::format("invis{}", i); } @@ -1037,7 +1037,7 @@ class gate_layout_hexagonal_drawer : public simple_gate_layout_tile_drawer{invisible_node(row), base_drawer::tile_id({0, row})}); // previous row only exist if i != 0 if (row != 0) diff --git a/include/fiction/technology/charge_distribution_surface.hpp b/include/fiction/technology/charge_distribution_surface.hpp index 5a75d286b..92b707b49 100644 --- a/include/fiction/technology/charge_distribution_surface.hpp +++ b/include/fiction/technology/charge_distribution_surface.hpp @@ -174,7 +174,7 @@ class charge_distribution_surface : public Lyt { private: /** - * The distance matrix is a vector of vectors storing the euclidean distance in nm. + * The distance matrix is a vector of vectors storing the Euclidean distance in nm. */ using distance_matrix = std::vector>; /** @@ -383,7 +383,7 @@ class charge_distribution_surface : public Lyt for (const auto& c : strg->sidb_order) { auto pos = sidb_nm_position(Lyt{}, c); - positions.push_back(std::make_pair(pos.first, pos.second)); + positions.emplace_back(pos.first, pos.second); } return positions;