Working on Github Actions
This commit is contained in:
parent
679947de83
commit
43f112faaa
55
.github/workflows/build-and-test.yml
vendored
55
.github/workflows/build-and-test.yml
vendored
|
@ -19,7 +19,18 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {
|
- {
|
||||||
name: "Ubuntu Latest GCC",
|
name: "Linux / GCC (Debug, Single Precision)",
|
||||||
|
os: ubuntu-latest,
|
||||||
|
artifact: "ubuntu_gcc.7z",
|
||||||
|
build_type: "Debug",
|
||||||
|
cc: "gcc",
|
||||||
|
cxx: "g++",
|
||||||
|
archiver: "7z a",
|
||||||
|
generators: "Ninja",
|
||||||
|
double_precision: false
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "Linux / GCC (Release, Single Precision)",
|
||||||
os: ubuntu-latest,
|
os: ubuntu-latest,
|
||||||
artifact: "ubuntu_gcc.7z",
|
artifact: "ubuntu_gcc.7z",
|
||||||
build_type: "Release",
|
build_type: "Release",
|
||||||
|
@ -39,7 +50,7 @@ jobs:
|
||||||
echo github.event.action: ${{ github.event.action }}
|
echo github.event.action: ${{ github.event.action }}
|
||||||
echo github.event_name: ${{ github.event_name }}
|
echo github.event_name: ${{ github.event_name }}
|
||||||
|
|
||||||
- name: Install dependencies on windows
|
- name: Install dependencies on Windows
|
||||||
if: startsWith(matrix.config.os, 'windows')
|
if: startsWith(matrix.config.os, 'windows')
|
||||||
run: |
|
run: |
|
||||||
choco install ninja cmake
|
choco install ninja cmake
|
||||||
|
@ -47,8 +58,8 @@ jobs:
|
||||||
cmake --version
|
cmake --version
|
||||||
# cmd "${{ matrix.config.environment_script }}"
|
# cmd "${{ matrix.config.environment_script }}"
|
||||||
|
|
||||||
- name: Install dependencies on Ubuntu
|
- name: Install dependencies on Linux
|
||||||
if: startsWith(matrix.config.name, 'Ubuntu Latest GCC')
|
if: startsWith(matrix.config.name, 'Linux')
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install ninja-build cmake
|
sudo apt-get install ninja-build cmake
|
||||||
|
@ -56,42 +67,6 @@ jobs:
|
||||||
cmake --version
|
cmake --version
|
||||||
gcc --version
|
gcc --version
|
||||||
|
|
||||||
- name: Install dependencies on ubuntu9
|
|
||||||
if: startsWith(matrix.config.name, 'Ubuntu_GCC_9')
|
|
||||||
run: |
|
|
||||||
echo Update gcc-9 =======================================================================
|
|
||||||
echo gcc version before
|
|
||||||
gcc --version
|
|
||||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install ninja-build cmake gcc-9 g++-9
|
|
||||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
|
|
||||||
echo gcc version after
|
|
||||||
gcc --version
|
|
||||||
echo Update ninja =======================================================================
|
|
||||||
echo ninja version before
|
|
||||||
ninja --version
|
|
||||||
# wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
|
|
||||||
wget https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip
|
|
||||||
sudo unzip ninja-linux.zip -d /usr/local/bin/
|
|
||||||
sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force
|
|
||||||
echo ninja version after
|
|
||||||
ninja --version
|
|
||||||
echo Update cmake =======================================================================
|
|
||||||
echo cmake version before
|
|
||||||
cmake --version
|
|
||||||
# curl --silent "https://api.github.com/repos/Kitware/CMake/releases/latest" | sed -n 's/.*tag_name":\s"\(.*\)".*/\1/p' | head -2
|
|
||||||
# wget https://github.com/Kitware/CMake/releases/latest/download/cmake-3.16.5-Linux-x86_64.sh
|
|
||||||
cmake_version=$(curl --silent "https://api.github.com/repos/Kitware/CMake/releases/latest" | sed -n 's/.*tag_name":\s"\(.*\)".*/\1/p' | head -2 | cut -c 2-)
|
|
||||||
echo cmake download latest v$cmake_version version
|
|
||||||
wget https://github.com/Kitware/CMake/releases/download/v$cmake_version/cmake-$cmake_version-Linux-x86_64.sh
|
|
||||||
chmod +x cmake-$cmake_version-Linux-x86_64.sh
|
|
||||||
sudo mkdir /opt/cmake
|
|
||||||
sudo ./cmake-$cmake_version-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
|
|
||||||
sudo update-alternatives --install /usr/bin/cmake cmake /opt/cmake/bin/cmake 1 --force
|
|
||||||
echo cmake version after
|
|
||||||
cmake --version
|
|
||||||
|
|
||||||
- name: Install dependencies on MacOS
|
- name: Install dependencies on MacOS
|
||||||
if: startsWith(matrix.config.os, 'macos')
|
if: startsWith(matrix.config.os, 'macos')
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in New Issue
Block a user