Skip to content

Commit

Permalink
replace Travis CI by GitHub Actions CI
Browse files Browse the repository at this point in the history
Only using cmake+ninja, for now
  • Loading branch information
adriweb authored and debrouxl committed May 5, 2023
1 parent 2e44ff2 commit 27586cc
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 126 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.linux.workflow.yml
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 }}/
70 changes: 70 additions & 0 deletions .github/workflows/build.mac.workflow.yml
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 }}/
67 changes: 0 additions & 67 deletions .travis.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .travis/script.sh

This file was deleted.

0 comments on commit 27586cc

Please sign in to comment.