Skip to content

Commit a1e0e97

Browse files
authored
Merge pull request #2686 from ctapmex/ubuntu2004-deprecated
ci: change gcc7 build test
2 parents 0c6073f + 707fbe1 commit a1e0e97

File tree

3 files changed

+44
-45
lines changed

3 files changed

+44
-45
lines changed

.github/workflows/build.yml

+6-45
Original file line numberDiff line numberDiff line change
@@ -35,61 +35,22 @@ env:
3535
jobs:
3636
ubuntu-low-compiler:
3737
if: ${{ !(github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository != 'elfmz/far2l') }}
38-
runs-on: ubuntu-20.04
39-
38+
runs-on: ubuntu-latest
4039
strategy:
4140
fail-fast: false
4241
matrix:
43-
compiler: [ gcc, clang ]
44-
include:
45-
- compiler: gcc
46-
version: 7
47-
c: /usr/bin/gcc-7
48-
cxx: /usr/bin/g++-7
49-
- compiler: clang
50-
version: 7
51-
c: /usr/bin/clang-7
52-
cxx: /usr/bin/clang++-7
42+
compiler: [ gcc7, clang7 ]
5343

54-
name: ubuntu-${{ matrix.compiler }}-${{ matrix.version }}
44+
name: ubuntu-${{ matrix.compiler }}
5545

5646
steps:
5747
- name: Checkout source
5848
uses: actions/checkout@v4
5949

60-
- name: Install compilers
61-
run: >
62-
sudo apt-get update;
63-
sudo apt-get -y install gcc-7 g++-7 clang-7
64-
65-
- name: Install far2l dependencies
66-
run: >
67-
sudo apt-get -y install
68-
libuchardet-dev libxml2-dev libwxgtk3.0-gtk3-dev
69-
libx11-dev libxi-dev
70-
libssl-dev libsmbclient-dev libnfs-dev libneon27-dev libssh-dev
71-
libarchive-dev
72-
python3-dev python3-cffi
73-
74-
- name: Create Build Environment
75-
# Create a separate build directory as working directory for all subsequent commands
76-
run: mkdir -p _build
77-
78-
- name: Configure CMake
79-
# Use a bash shell so we can use the same syntax for environment variable
80-
# access regardless of the host operating system
81-
shell: bash
82-
# -S and -B options specify source and build directories
83-
run: >
84-
cmake -S . -B _build -Wno-dev -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON=yes
85-
-DCMAKE_C_COMPILER=${{ matrix.c }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
86-
87-
- name: Build
88-
shell: bash
89-
# Execute the build. You can specify a specific target with "--target <NAME>"
50+
- name: 'Build in docker'
9051
run: |
91-
cmake --build _build --config $BUILD_TYPE -j$(nproc --all)
92-
52+
docker build -f _ci/Dockerfile.${{ matrix.compiler }} -t tempx:latest .
53+
9354
ubuntu-medium-compiler:
9455
if: ${{ !(github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository != 'elfmz/far2l') }}
9556
runs-on: ubuntu-22.04

_ci/Dockerfile.clang7

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Image for the test build far2l with clang 7
2+
# run build from root of project
3+
4+
FROM ghcr.io/colorer/devimage:clang7
5+
6+
SHELL ["/bin/bash", "-xeuo", "pipefail", "-c"]
7+
8+
WORKDIR /code
9+
10+
RUN --mount=type=bind,source=.,target=/code/far2l \
11+
<<EOT
12+
apt-get update
13+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libuchardet-dev libxml2-dev libwxgtk3.0-gtk3-dev \
14+
libx11-dev libxi-dev libssl-dev libsmbclient-dev libnfs-dev libneon27-dev libssh-dev libarchive-dev \
15+
python3-dev python3-cffi
16+
mkdir build
17+
cmake -S far2l -B build -Wno-dev -DCMAKE_BUILD_TYPE=Release -DPYTHON=yes -DCMAKE_C_COMPILER=/usr/bin/clang-7 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-7
18+
cmake --build build -j$(nproc --all)
19+
EOT

_ci/Dockerfile.gcc7

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Image for the test build far2l with gcc/g++ 7.5
2+
# run build from root of project
3+
4+
FROM ghcr.io/colorer/devimage:gcc7
5+
6+
SHELL ["/bin/bash", "-xeuo", "pipefail", "-c"]
7+
8+
WORKDIR /code
9+
10+
RUN --mount=type=bind,source=.,target=/code/far2l \
11+
<<EOT
12+
apt-get update
13+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libuchardet-dev libxml2-dev libwxgtk3.0-gtk3-dev \
14+
libx11-dev libxi-dev libssl-dev libsmbclient-dev libnfs-dev libneon27-dev libssh-dev libarchive-dev \
15+
python3-dev python3-cffi
16+
mkdir build
17+
cmake -S far2l -B build -Wno-dev -DCMAKE_BUILD_TYPE=Release -DPYTHON=yes
18+
cmake --build build -j$(nproc --all)
19+
EOT

0 commit comments

Comments
 (0)