Skip to content

Commit

Permalink
ci: refactor linux workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Jan 23, 2022
1 parent 54b4ef4 commit 2b2c3b7
Showing 1 changed file with 16 additions and 95 deletions.
111 changes: 16 additions & 95 deletions .github/workflows/amd64_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,19 @@ on:

jobs:
# Building using the github runner environement directly.
ninja:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
build: [
["Unix Makefiles", "Release"],
["Ninja", "Release"],
["Ninja Multi-Config", "Release"]
]
fail-fast: false
env:
GENERATOR: ${{ matrix.build[0] }}
BUILD_TYPE: ${{ matrix.build[1] }}
steps:
- uses: actions/checkout@v2
- name: Install Ninja
Expand Down Expand Up @@ -49,100 +60,10 @@ jobs:
- name: Check cmake
run: cmake --version
- name: Configure
run: cmake -S. -Bbuild -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install
run: cmake -S. -Bbuild -G $GENERATOR -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=install
- name: Build
run: cmake --build build --target all -v
run: cmake --build build --config $BUILD_TYPE --target all -v
- name: Test
run: cmake --build build --target test -v
run: cmake --build build --config $BUILD_TYPE --target test -v
- name: Install
run: cmake --build build --target install -v
ninja-multi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Ninja
run: |
sudo apt-get update
sudo apt-get install ninja-build
- name: Uninstall preinstalled swig3.0
run: |
swig -version;
sudo apt remove -y swig swig3.0
- name: Install SWIG 4.0.2
run: |
wget "https://github.com/swig/swig/archive/refs/tags/v4.0.2.tar.gz" -O swig-4.0.2.tar.gz;
tar xvf swig-4.0.2.tar.gz;
rm swig-4.0.2.tar.gz;
cd swig-4.0.2;
./autogen.sh;
./configure --prefix=/usr;
make -j8;
sudo make install;
cd ..;
rm -rf swig-4.0.2;
- name: Check swig
run: swig -version
# Install .NET SDKs
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Check dotnet
run: dotnet --info
- name: Check cmake
run: cmake --version
- name: Configure
run: cmake -S. -Bbuild -G "Ninja Multi-Config" -DCMAKE_INSTALL_PREFIX=install
- name: Build
run: cmake --build build --config Release --target all -v
- name: Test
run: cmake --build build --config Release --target test -v
- name: Install
run: cmake --build build --config Release --target install -v
make:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Uninstall preinstalled swig3.0
run: |
swig -version;
sudo apt remove -y swig swig3.0
- name: Install SWIG 4.0.2
run: |
wget "https://github.com/swig/swig/archive/refs/tags/v4.0.2.tar.gz" -O swig-4.0.2.tar.gz;
tar xvf swig-4.0.2.tar.gz;
rm swig-4.0.2.tar.gz;
cd swig-4.0.2;
./autogen.sh;
./configure --prefix=/usr;
make -j8;
sudo make install;
cd ..;
rm -rf swig-4.0.2;
- name: Check swig
run: swig -version
# Install .NET SDKs
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Check dotnet
run: dotnet --info
- name: Check cmake
run: cmake --version
- name: Configure
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install
- name: Build
run: cmake --build build --target all -v
- name: Test
run: cmake --build build --target test -v
- name: Install
run: cmake --build build --target install -v
run: cmake --build build --config $BUILD_TYPE --target install -v

0 comments on commit 2b2c3b7

Please # to comment.