Skip to content

Commit

Permalink
👷 Added ARM64 CI runs on Linux (#635)
Browse files Browse the repository at this point in the history
* 🔥 Drop legacy `ubuntu-20.04` C++20 CI

* 👷 Added `ubuntu-24.04-arm` for ARM64 CI runs on Linux

* 💚 `ccache` doesn't seem to work on ARM yet

* 💚 Disable Z3 on ARM

* 💚 Exclude `g++` on Linux ARM due to library incompatibility

* 👷 Add the ARM Linux platform to PyPI deployment

* 🎨 Incorporated pre-commit fixes

* 💚 Disable `ccache` on ARM

* 💚 Attempt to fix compiler error on ARM Linux

* 💚 Attempt to fix compiler error on ARM Linux

* 💚 Attempt to utilize Z3 on ARM

* 🎨 Simplify `setup-z3` calls

* ⏪ Revert Z3 on ARM changes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
marcelwa and pre-commit-ci[bot] authored Jan 23, 2025
1 parent c47c5b0 commit 1cdb4b9
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 31 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pyfiction-pypi-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -95,6 +96,7 @@ jobs:
uses: ilammy/msvc-dev-cmd@v1

- name: Setup ccache
if: matrix.runs-on != 'ubuntu-24.04-arm'
uses: hendrikmuhs/[email protected]
with:
key: "${{matrix.config.os}}-pyfiction"
Expand Down Expand Up @@ -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

Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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/[email protected]
with:
key: "${{matrix.os}}-${{matrix.compiler}}"
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions include/fiction/io/dot_drawers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,12 @@ class simple_gate_layout_tile_drawer : public technology_dot_drawer<Lyt, DrawInd
return columns;
}

[[nodiscard]] std::string same_rank(const std::vector<std::string>& rank) const noexcept
[[nodiscard]] static std::string same_rank(const std::vector<std::string>& 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);
}
Expand Down Expand Up @@ -995,7 +995,7 @@ class gate_layout_hexagonal_drawer : public simple_gate_layout_tile_drawer<Lyt,
protected:
using base_drawer = simple_gate_layout_tile_drawer<Lyt, ClockColors, DrawIndexes>;

[[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);
}
Expand Down Expand Up @@ -1037,7 +1037,7 @@ class gate_layout_hexagonal_drawer : public simple_gate_layout_tile_drawer<Lyt,

void shift_row(const Lyt& lyt, const uint64_t row, std::stringstream& stream) const noexcept
{
stream << base_drawer::same_rank({{invisible_node(row), base_drawer::tile_id({0, row})}});
stream << base_drawer::same_rank(std::vector<std::string>{invisible_node(row), base_drawer::tile_id({0, row})});

// previous row only exist if i != 0
if (row != 0)
Expand Down
4 changes: 2 additions & 2 deletions include/fiction/technology/charge_distribution_surface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class charge_distribution_surface<Lyt, false> : 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<std::vector<double>>;
/**
Expand Down Expand Up @@ -383,7 +383,7 @@ class charge_distribution_surface<Lyt, false> : public Lyt
for (const auto& c : strg->sidb_order)
{
auto pos = sidb_nm_position<Lyt>(Lyt{}, c);
positions.push_back(std::make_pair(pos.first, pos.second));
positions.emplace_back(pos.first, pos.second);
}

return positions;
Expand Down

0 comments on commit 1cdb4b9

Please sign in to comment.