Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI action #2515

Merged
merged 5 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:

jobs:
build:
if: ${{ !(github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository != 'elfmz/far2l') }}
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac.
runs-on: ubuntu-latest
Expand All @@ -36,7 +37,7 @@ jobs:
# access regardless of the host operating system
shell: bash
# -S and -B options specify source and build directories
run: cmake -S . -B _build -DCMAKE_BUILD_TYPE=$BUILD_TYPE ${{ matrix.options }}
run: cmake -S . -B _build -Wno-dev -DCMAKE_BUILD_TYPE=$BUILD_TYPE ${{ matrix.options }}

- name: Build
shell: bash
Expand Down
43 changes: 27 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ env:

jobs:
ubuntu-low-compiler:
if: ${{ !(github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository != 'elfmz/far2l') }}
runs-on: ubuntu-20.04

strategy:
Expand All @@ -42,28 +43,33 @@ jobs:
compiler: [ gcc, clang ]
include:
- compiler: gcc
version: 10
c: /usr/bin/gcc-10
cxx: /usr/bin/g++-10
version: 7
c: /usr/bin/gcc-7
cxx: /usr/bin/g++-7
- compiler: clang
version: 10
c: /usr/bin/clang-10
cxx: /usr/bin/clang++-10
version: 7
c: /usr/bin/clang-7
cxx: /usr/bin/clang++-7

name: ubuntu-${{ matrix.compiler }}-${{ matrix.version }}

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Install dependencies

- name: Install compilers
run: >
sudo apt-get update;
sudo apt-get -y install gcc-7 g++-7 clang-7

- name: Install far2l dependencies
run: >
sudo apt-get update;
sudo apt-get -y install
libuchardet-dev libxml2-dev libwxgtk3.0-gtk3-dev
libx11-dev libxi-dev
libssl-dev libsmbclient-dev libnfs-dev libneon27-dev libssh-dev
libarchive-dev libpcre2-dev
python3-dev python3-cffi

- name: Create Build Environment
# Create a separate build directory as working directory for all subsequent commands
Expand All @@ -75,7 +81,7 @@ jobs:
shell: bash
# -S and -B options specify source and build directories
run: >
cmake -S . -B _build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON=yes
cmake -S . -B _build -Wno-dev -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON=yes
-DCMAKE_C_COMPILER=${{ matrix.c }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }}

- name: Build
Expand All @@ -85,6 +91,7 @@ jobs:
cmake --build _build --config $BUILD_TYPE -j$(nproc --all)

ubuntu-medium-compiler:
if: ${{ !(github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository != 'elfmz/far2l') }}
runs-on: ubuntu-22.04

strategy:
Expand All @@ -107,14 +114,15 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Install dependencies
- name: Install far2l dependencies
run: >
sudo apt-get update;
sudo apt-get -y install
libuchardet-dev libxml2-dev libwxgtk3.0-gtk3-dev
libx11-dev libxi-dev
libssl-dev libsmbclient-dev libnfs-dev libneon27-dev libssh-dev
libarchive-dev libpcre2-dev
python3-dev python3-cffi

- name: Create Build Environment
# Create a separate build directory as working directory for all subsequent commands
Expand All @@ -126,7 +134,7 @@ jobs:
shell: bash
# -S and -B options specify source and build directories
run: >
cmake -S . -B _build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON=yes
cmake -S . -B _build -Wno-dev -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON=yes
-DCMAKE_C_COMPILER=${{ matrix.c }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }}

- name: Build
Expand All @@ -136,6 +144,7 @@ jobs:
cmake --build _build --config $BUILD_TYPE -j$(nproc --all)

ubuntu-high-compiler:
if: ${{ !(github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository != 'elfmz/far2l') }}
runs-on: ubuntu-24.04

strategy:
Expand All @@ -158,14 +167,15 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Install dependencies
- name: Install far2l dependencies
run: >
sudo apt-get update;
sudo apt-get -y install
libuchardet-dev libxml2-dev libwxgtk3.2-dev
libx11-dev libxi-dev
libssl-dev libsmbclient-dev libnfs-dev libneon27-dev libssh-dev
libarchive-dev libpcre2-dev
python3-dev python3-cffi

- name: Create Build Environment
# Create a separate build directory as working directory for all subsequent commands
Expand All @@ -177,7 +187,7 @@ jobs:
shell: bash
# -S and -B options specify source and build directories
run: >
cmake -S . -B _build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON=yes
cmake -S . -B _build -Wno-dev -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON=yes
-DCMAKE_C_COMPILER=${{ matrix.c }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }}

- name: Build
Expand All @@ -187,14 +197,15 @@ jobs:
cmake --build _build --config $BUILD_TYPE -j$(nproc --all)

macos14-arm64-clang15:
if: ${{ !(github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository != 'elfmz/far2l') }}
runs-on: macos-14

steps:

- name: Checkout source
uses: actions/checkout@v4

- name: Install dependencies
- name: Install far2l dependencies
# libx11, openssl is already installed
run: >
brew install
Expand All @@ -215,7 +226,7 @@ jobs:
# access regardless of the host operating system
shell: bash
# -S and -B options specify source and build directories
run: cmake -S . -B _build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON=yes
run: cmake -S . -B _build -Wno-dev -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON=yes

- name: Build
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ if(GIT_FOUND)
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tag
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
endif()

if(NOT "${GIT_TAG}" STREQUAL "v_${VERSION}")
Expand Down