Skip to content

Commit

Permalink
Merge pull request #9 from harry-anderson/feat/harry/upgrade-pinned-v…
Browse files Browse the repository at this point in the history
…ersions

update pinned versions
  • Loading branch information
XiangpengHao authored Dec 13, 2023
2 parents 99da7a6 + 8724a82 commit 4d31780
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
lto: ["ON", "OFF"]
env:
DEBIAN_FRONTEND: noninteractive
CC: clang-13
CXX: clang++-13
CC: clang-17
CXX: clang++-17
steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -29,7 +29,7 @@ jobs:
- run: sudo apt install -y cmake git
- run: wget https://apt.llvm.org/llvm.sh
- run: chmod +x ./llvm.sh
- run: sudo ./llvm.sh 13 13
- run: sudo ./llvm.sh 17 17
- run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=${{matrix.lto}} ..
- run: cd build && make
- run: cd build && ./main
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
From ubuntu:21.04
From ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC
ENV PATH="/root/.cargo/bin:${PATH}" CC=clang-13 CXX=clang++-13
ENV PATH="/root/.cargo/bin:${PATH}" CC=clang-17 CXX=clang++-17

RUN apt update \
&& apt install -y build-essential curl cmake git wget lsb-release software-properties-common
RUN apt-get update \
&& apt-get install -y build-essential curl cmake git wget lsb-release software-properties-common

RUN curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain 1.58.0 -y
RUN curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain 1.74.1 -y

RUN wget https://apt.llvm.org/llvm.sh \
&& chmod +x ./llvm.sh \
&& ./llvm.sh 13 no

&& ./llvm.sh 17 no

COPY . /usr/src/cxx_example
WORKDIR /usr/src/cxx_example

RUN cargo install cxxbridge-cmd
RUN cargo install cxxbridge-cmd --version 1.0.110

RUN mkdir docker-build && cd docker-build && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=ON .. \
&& make && ./main
2 changes: 1 addition & 1 deletion rust_part/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ else ()
endif ()

if(ENABLE_LTO)
set(RUST_FLAGS "-Clinker-plugin-lto" "-Clinker=clang-13" "-Clink-arg=-fuse-ld=lld-13")
set(RUST_FLAGS "-Clinker-plugin-lto" "-Clinker=clang-17" "-Clink-arg=-fuse-ld=lld-17")
endif()

set(RUST_PART_LIB "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_DIR}/librust_part.a")
Expand Down

0 comments on commit 4d31780

Please sign in to comment.