Skip to content

Commit 6d6a72b

Browse files
committed
Update workflows and Dockerfiles to use recursive submodule cloning
1 parent 647bade commit 6d6a72b

File tree

7 files changed

+23
-17
lines changed

7 files changed

+23
-17
lines changed

.github/workflows/coverage.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ jobs:
1414
sudo apt-get update && sudo apt-get install -y cmake git g++ libtbb-dev libmpfr-dev libgmp-dev libpython3-dev python3 python3-distutils
1515
- name: Clone
1616
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
submodules: true
1720
- name: Compile
1821
run: |
1922
git config --global --add safe.directory /__w/vpmr/vpmr
20-
git submodule update --init --recursive
2123
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..
2224
make -j"$(nproc)"
2325
./vpmr -h

.github/workflows/release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ jobs:
1818
apt-get update && apt-get install -y cmake git g++ libtbb-dev libmpfr-dev libgmp-dev libpython3-dev python3 python3-distutils wget gtk-update-icon-cache
1919
- name: Clone
2020
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
submodules: true
2124
- name: Compile
2225
run: |
2326
git config --global --add safe.directory /__w/vpmr/vpmr
24-
git submodule update --init --recursive
2527
cd eigen && git apply ../patch_size.patch && cd ..
2628
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..
2729
make -j"$(nproc)"
@@ -68,7 +70,7 @@ jobs:
6870
cat AppImageBuilder.yml
6971
- name: Package
7072
run: |
71-
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20220822-1/linuxdeploy-x86_64.AppImage
73+
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-x86_64.AppImage
7274
chmod +x linuxdeploy-x86_64.AppImage
7375
wget -q https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
7476
chmod +x appimage-builder-1.1.0-x86_64.AppImage

.github/workflows/wheels.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
submodules: true
1417
- name: Setup
1518
run: |
16-
git submodule update --init --recursive
1719
cd eigen && git apply ../patch_size.patch && cd ..
1820
- name: Build
1921
run: pipx run build --sdist
@@ -48,9 +50,11 @@ jobs:
4850
steps:
4951
- name: Checkout
5052
uses: actions/checkout@v4
53+
with:
54+
fetch-depth: 0
55+
submodules: true
5156
- name: Setup
5257
run: |
53-
git submodule update --init --recursive
5458
cd eigen && git apply ../patch_size.patch && cd ..
5559
- name: CI Build Wheel macos-14
5660
if: matrix.os == 'macos-14'

.github/workflows/windows.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ jobs:
1919
install: git mingw-w64-x86_64-cmake mingw-w64-x86_64-tbb mingw-w64-x86_64-gcc mingw-w64-x86_64-ninja mingw-w64-x86_64-gmp mingw-w64-x86_64-mpfr mingw-w64-x86_64-7zip
2020
- name: Clone
2121
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
submodules: true
2225
- name: Version
2326
run: |
2427
echo ("VPMR_VERSION="+(get-date -format "yyMMdd")) >> $env:GITHUB_ENV
2528
- name: Compile
2629
shell: msys2 {0}
2730
run: |
28-
git submodule update --init --recursive
2931
cd eigen && git apply --ignore-space-change --ignore-whitespace ../patch_size.patch && cd ..
3032
mkdir build && cd build
3133
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..

Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
FROM ubuntu:22.04 as build
1+
FROM ubuntu:22.04 AS build
22

33
RUN apt-get update -y && apt-get install -y cmake git g++ libtbb-dev libmpfr-dev libgmp-dev
44

5-
RUN git clone --depth 1 https://github.com/TLCFEM/vpmr.git
5+
RUN git clone --recurse-submodules --depth 1 https://github.com/TLCFEM/vpmr.git
66

77
WORKDIR /vpmr
88

9-
RUN git submodule update --init --recursive
109
RUN cd eigen && git apply ../patch_size.patch && cd ..
1110
RUN mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
1211

13-
FROM ubuntu:22.04 as runtime
12+
FROM ubuntu:22.04 AS runtime
1413

1514
RUN apt-get update -y && apt-get install -y libtbb12 libmpfr6 libgmp10 && apt-get clean -y
1615

README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,8 @@ WSL.
239239
# install necessary packages
240240
pacman -S git mingw-w64-x86_64-cmake mingw-w64-x86_64-tbb mingw-w64-x86_64-gcc mingw-w64-x86_64-ninja mingw-w64-x86_64-gmp mingw-w64-x86_64-mpfr
241241
# clone the repository
242-
git clone --depth 1 https://github.com/TLCFEM/vpmr.git
243-
# initialise submodules
242+
git clone --recurse-submodules --depth 1 https://github.com/TLCFEM/vpmr.git
244243
cd vpmr
245-
git submodule update --init --recursive
246244
# apply patch to enable parallel evaluation of some loops in SVD
247245
cd eigen && git apply --ignore-space-change --ignore-whitespace ../patch_size.patch && cd ..
248246
# configure and compile
@@ -257,9 +255,8 @@ The following is based on Fedora.
257255
```bash
258256
sudo dnf install gcc g++ gfortran cmake git -y
259257
sudo dnf install tbb-devel mpfr-devel gmp-devel -y
260-
git clone --depth 1 https://github.com/TLCFEM/vpmr.git
258+
git clone --recurse-submodules --depth 1 https://github.com/TLCFEM/vpmr.git
261259
cd vpmr
262-
git submodule update --init --recursive
263260
cd eigen && git apply --ignore-space-change --ignore-whitespace ../patch_size.patch && cd ..
264261
cmake -DCMAKE_BUILD_TYPE=Release .
265262
make

resource/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ FROM alpine:3 AS builder
22

33
RUN apk add make cmake git g++ onetbb-dev mpfr-dev gmp-dev
44

5-
RUN git clone --depth 1 https://github.com/TLCFEM/vpmr.git
5+
RUN git clone --recurse-submodules --depth 1 https://github.com/TLCFEM/vpmr.git
66
WORKDIR /vpmr
7-
RUN git submodule update --init --recursive && cd eigen && git apply --ignore-space-change --ignore-whitespace ../patch_size.patch && cd .. && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
7+
RUN cd eigen && git apply --ignore-space-change --ignore-whitespace ../patch_size.patch && cd .. && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
88

99
FROM alpine:3 AS runtime
1010
RUN apk add onetbb mpfr

0 commit comments

Comments
 (0)