-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace Travis CI by GitHub Actions CI
Only using cmake+ninja, for now
- Loading branch information
Showing
4 changed files
with
139 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Build Linux | ||
|
||
on: | ||
push: | ||
branches: [ master, feature/github-actions ] | ||
pull_request: | ||
branches: [ master, feature/github-actions ] | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
name: "Build: ${{ matrix.os }} - ${{ matrix.deps_type }} deps" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04] | ||
try_static_deps: ['OFF','ON'] | ||
include: | ||
- try_static_deps: 'OFF' | ||
deps_type: shared | ||
- try_static_deps: 'ON' | ||
deps_type: static | ||
|
||
steps: | ||
- name: Checkout Git Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: workaround for default apt mirror connectivity issues | ||
run: | | ||
sudo sed -i 's/azure\.//' /etc/apt/sources.list | ||
- name: Install dependencies | ||
run: | | ||
set -e | ||
sudo add-apt-repository universe | ||
sudo apt update | ||
sudo apt install -y cmake ninja-build libarchive-dev libzstd-dev zlib1g-dev libusb-1.0-0-dev libglib2.0-dev gettext nettle-dev libacl1-dev liblzma-dev liblz4-dev libudev-dev libc6-dev | ||
- name: Build tilibs | ||
run: | | ||
set -e | ||
mkdir prefix | ||
prefixpath="$(pwd)/prefix" | ||
mkdir build && cd build | ||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DTRY_STATIC_LIBS=${{ matrix.try_static_deps }} -DCMAKE_INSTALL_PREFIX=${prefixpath} .. | ||
cmake --build . --target all | ||
- name: Test tilibs | ||
run: | | ||
cd build | ||
cmake --build . --target check | ||
- name: Install tilibs | ||
run: | | ||
cd build | ||
cmake --build . --target install | ||
- name: Prepare install folder for upload | ||
run: mv prefix tilibs_linux_${{ matrix.deps_type }}Deps_${{ github.sha }} | ||
|
||
- name: Upload install folder | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: tilibs_linux_${{ matrix.deps_type }}Deps_${{ github.sha }} | ||
path: tilibs_linux_${{ matrix.deps_type }}Deps_${{ github.sha }}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Build macOS | ||
|
||
on: | ||
push: | ||
branches: [ master, feature/github-actions ] | ||
pull_request: | ||
branches: [ master, feature/github-actions ] | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
name: "Build: ${{ matrix.os }} - ${{ matrix.deps_type }} deps" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macOS-latest] | ||
try_static_deps: ['OFF','ON'] | ||
include: | ||
- try_static_deps: 'OFF' | ||
deps_type: shared | ||
- try_static_deps: 'ON' | ||
deps_type: static | ||
|
||
steps: | ||
- name: Checkout Git Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Install dependencies | ||
run: | | ||
set -e | ||
brew install cmake ninja gettext libarchive glib libusb libiconv intltool expat bzip2 zlib | ||
# Workaround! | ||
# libarchive.pc now has (lib)iconv in Requires.private, which doesn't work here | ||
# See https://github.com/libarchive/libarchive/pull/1813 and other issues | ||
- name: Fix libarchive pkg-config file | ||
run: | | ||
sudo sed -i '' -E '/^Requires.private: (lib)?iconv/d' /usr/local/opt/libarchive/lib/pkgconfig/libarchive.pc | ||
- name: Build tilibs | ||
run: | | ||
set -e | ||
mkdir prefix | ||
prefixpath="$(pwd)/prefix" | ||
mkdir build && cd build | ||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DTRY_STATIC_LIBS=${{ matrix.try_static_deps }} -DCMAKE_INSTALL_PREFIX=${prefixpath} .. | ||
cmake --build . --target all | ||
- name: Test tilibs | ||
run: | | ||
cd build | ||
cmake --build . --target check | ||
- name: Install tilibs | ||
run: | | ||
cd build | ||
cmake --build . --target install | ||
- name: Prepare install folder for upload | ||
run: mv prefix tilibs_mac_${{ matrix.deps_type }}Deps_${{ github.sha }} | ||
|
||
- name: Upload install folder | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: tilibs_mac_${{ matrix.deps_type }}Deps_${{ github.sha }} | ||
path: tilibs_mac_${{ matrix.deps_type }}Deps_${{ github.sha }}/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.