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

Add Alpine Linux build #81

Merged
merged 48 commits into from
Apr 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
f2eb7cf
Correct processing and tests for symlinks pointing outside of memfs #64
maxirmx Mar 16, 2022
08d5ea5
Fixed ASAN and other test issues
maxirmx Mar 16, 2022
e1bfbca
Added lint workflow
maxirmx Mar 16, 2022
5ed1992
lint fixes 1
maxirmx Mar 16, 2022
9511898
lint fixes 2
maxirmx Mar 16, 2022
9b4e102
lint fixes 3
maxirmx Mar 16, 2022
633dafe
lint fixes 4
maxirmx Mar 16, 2022
c94817a
lint fixes 5
maxirmx Mar 16, 2022
d8576d2
lint fixes 6
maxirmx Mar 16, 2022
a02c7ac
lint fixes 7
maxirmx Mar 16, 2022
c97e5ed
Add link test
maxirmx Apr 1, 2022
86e4c34
Alpine workflow 1
maxirmx Apr 1, 2022
5544710
Alpine workflow 2
maxirmx Apr 1, 2022
ec35493
Alpine workflow 3
maxirmx Apr 1, 2022
9a0606e
Alpine build 1
maxirmx Apr 1, 2022
80a17af
Alpine build 2
maxirmx Apr 1, 2022
e57eecf
Alpine build 4
maxirmx Apr 1, 2022
92afb9e
Alpine build 4
maxirmx Apr 1, 2022
21e546d
Alpine build 5
maxirmx Apr 1, 2022
e182f4d
Alpine build 6
maxirmx Apr 1, 2022
67ac0c4
Alpine build 7
maxirmx Apr 1, 2022
28a4859
Alpine build 8
maxirmx Apr 1, 2022
35e4705
Alpine build 9
maxirmx Apr 1, 2022
6f3375c
Alpine build 10
maxirmx Apr 1, 2022
03d260f
Alpine build 11
maxirmx Apr 1, 2022
5cf091e
Alpine build 12
maxirmx Apr 1, 2022
d66ccb8
Alpine build 13
maxirmx Apr 1, 2022
385b969
Alpine build 14
maxirmx Apr 1, 2022
6880749
Alpine build 15
maxirmx Apr 1, 2022
7b58615
Alpine build 16
maxirmx Apr 1, 2022
e0fbe4e
Alpine build 17
maxirmx Apr 1, 2022
946a8a0
Alpine build 18
maxirmx Apr 1, 2022
bbbbe79
Alpine build 19
maxirmx Apr 1, 2022
c4a611a
Alpine build 20
maxirmx Apr 2, 2022
b321a7f
Alpine build 21
maxirmx Apr 2, 2022
9b0901b
Alpine build 21
maxirmx Apr 2, 2022
59d2ba0
Alpine build 22
maxirmx Apr 2, 2022
5c6e62f
Alpine build 23
maxirmx Apr 2, 2022
0823cf3
Merge branch 'maxirmx_symlinks' into maxirmx_alpine
maxirmx Apr 2, 2022
8c16aa3
Comment tebako_softlink_to_dir_open test
maxirmx Apr 2, 2022
d84b708
Lint fix
maxirmx Apr 2, 2022
187d696
Cleanup
maxirmx Apr 2, 2022
ffae21a
Added tar (GNU tar?) to ensure caching
maxirmx Apr 2, 2022
ca85fc0
Status badge
maxirmx Apr 2, 2022
1386a18
Alpine cache test
maxirmx Apr 2, 2022
95a202f
More cache tests
maxirmx Apr 2, 2022
5610056
More cache tests 2
maxirmx Apr 2, 2022
0ba7889
More cache tests 3
maxirmx Apr 2, 2022
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
156 changes: 156 additions & 0 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# Copyright (c) 2021-2022 [Ribose Inc](https://www.ribose.com).
# All rights reserved.
# This file is a part of tamatebako
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

name: Alpine

on:
push:
paths-ignore:
- 'docs/**'
- '**.adoc'
- '**.md'
- '.github/workflows/ubuntu.yml'
- '.github/workflows/macos.yml'
- '.github/workflows/macos-arm64.yml'
- 'cmake/def_darwin_env.cmake'
- '.github/workflows/lint.yml'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.adoc'
- '**.md'
- '.github/workflows/ubuntu.yml'
- '.github/workflows/macos.yml'
- '.github/workflows/macos-arm64.yml'
- 'cmake/def_darwin_env.cmake'
- '.github/workflows/lint.yml'
workflow_dispatch:

env:
# The folder for dwarfs and other dependenies
DEPS: deps
CACHE_VER: "09"
# GitHub dependencies'
INCBIN_TAG: "348e36b"
DWARFS_TAG: "libdwarfs_wr_v0.1.8"
LIBARCHIVE_VER: "3.5.2"
# Misc
DEBIAN_FRONTEND: "noninteractive"
TZ: "Etc/UTC"
MAKEFLAGS: -j4

jobs:
build:
name: alpine-latest [CC ${{ matrix.env.CC }}, ASAN ${{ matrix.env.ASAN }}, ${{ matrix.env.LOG_LEVEL }} ]
runs-on: ubuntu-latest
container:
image: alpine:latest
strategy:
fail-fast: false
matrix:
env:
- CC: gcc
CXX: g++
ASAN: 'OFF'
LOG_LEVEL: 'trace'
- CC: clang
CXX: clang++
ASAN: 'OFF'
LOG_LEVEL: 'warn'
# ASAN libraries are not there for clang 12, but it looks like it will be ready with clng 13
# (as a part of compiler-rt package)
# - CC: clang
# CXX: clang++
# ASAN: 'ON'
# LOG_LEVEL: 'warn'
# 'compiler-rt' apk is required to support ASAN
env: ${{ matrix.env }}
steps:
- name: Install packages
run: |
apk --no-cache --upgrade add build-base cmake git bash \
autoconf boost-static boost-dev fmt-dev flex-dev bison \
binutils-dev libarchive-dev libevent-dev acl-dev \
double-conversion-dev lz4-dev openssl-dev zlib-dev \
libunwind-dev libdwarf-dev glog-dev elfutils-dev \
libevent-static openssl-libs-static lz4-static xz-dev \
zlib-static libunwind-static acl-static tar

- name: Install clang
if: ${{ matrix.env.CC == 'clang' }}
run: |
apk --no-cache --upgrade add clang

- name: Checkout
uses: actions/checkout@v3
with:
submodules: true

- name: Patch system includes
if: ${{ matrix.env.CC == 'clang' }}
run: tools/ci-scripts/patch-system-includes.sh

- name: Create deps folder
run: |
mkdir ${{env.DEPS}}
echo "Keys" > key.txt
echo ${{ env.DWARFS_TAG }} >> key.txt
echo ${{ env.INCBIN_TAG }} >> key.txt
echo ${{ env.LIBARCHIVE_VER }} >> key.txt

- name: Process cache
uses: actions/cache@v2
with:
path: ${{env.DEPS}}
key: alpine-latest-${{ matrix.env.CC }}-${{ hashFiles('key.txt') }}-v${{ env.CACHE_VER }}

- name: Build libjemalloc
run: |
wget -q https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2
tar -xf jemalloc-5.2.1.tar.bz2
cd jemalloc-5.2.1
./configure
make -j4
make install

- name: Configure
run: cmake . -DWITH_TESTS=ON -DWITH_ASAN=${{ env.ASAN }} -DTESTS_LOG_LEVEL=${{ env.LOG_LEVEL }}

- name: Build
run: cmake --build .

- name: Run unit tests
run: make test

- name: Checkout shell test framework
uses: actions/checkout@v2
with:
repository: kward/shunit2
path: tests/shunit2
fetch-depth: 1

- name: Run additional tests
run: tests/scripts/tests.sh
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: lint

on:
push:
paths-ignore:
- 'docs/**'
- '**.adoc'
- '**.md'
- .github/workflows/ubuntu.yml
- .github/workflows/macos.yml
- .github/workflows/macos-arm64.yml
- .github/workflows/alpine.yml
- 'cmake/def_darwin_env.cmake'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.adoc'
- '**.md'
- .github/workflows/ubuntu.yml
- .github/workflows/macos.yml
- .github/workflows/macos-arm64.yml
- .github/workflows/alpine.yml
- 'cmake/def_darwin_env.cmake'
workflow_dispatch:

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ludeeus/action-shellcheck@master
with:
ignore_paths: deps
env:
SHELLCHECK_OPTS: -x
20 changes: 12 additions & 8 deletions .github/workflows/macos-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,20 @@ on:
- 'docs/**'
- '**.adoc'
- '**.md'
- '.github/workflows/alpine.yml'
- '.github/workflows/ubuntu.yml'
- '.github/workflows/macos.yml'
- '.github/workflows/lint.yml'
pull_request:
branches: [ master ]
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.adoc'
- '**.md'
- '.github/workflows/alpine.yml'
- '.github/workflows/ubuntu.yml'
- '.github/workflows/macos.yml'
- '.github/workflows/lint.yml'
workflow_dispatch:

env:
Expand All @@ -52,10 +56,10 @@ env:
# The folder for dwarfs and other dependenies
DEPS: deps
DWARFS_BUILD: dwarfs-x86_64
CACHE_VER: "09"
CACHE_VER: "10"
# GitHub dependencies'
INCBIN_TAG: "348e36b"
DWARFS_TAG: "libdwarfs_wr_v0.1.7"
DWARFS_TAG: "libdwarfs_wr_v0.1.8"
LIBARCHIVE_VER: "3.5.2"
GLOG_TAG: "v0.5.0"
GFLAGS_TAG: "v2.2.2"
Expand All @@ -76,7 +80,7 @@ jobs:
xcode-version: '12.4'

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true

Expand All @@ -92,7 +96,7 @@ jobs:
echo ${{ env.GFLAGS_TAG }} >> key.txt
echo ${{ env.JEMALLOC_VER }} >> key.txt
echo 'LEVEL_UP<<EOF' >> $GITHUB_ENV
ci-scripts/level-up.sh "${{ github.workspace }}/.." >> $GITHUB_ENV
tools/ci-scripts/level-up.sh "${{ github.workspace }}/.." >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
echo 'BREW_HOME<<EOF' >> $GITHUB_ENV
brew --prefix >> $GITHUB_ENV
Expand Down Expand Up @@ -121,14 +125,14 @@ jobs:
- name: Install packages for target host architecture
if: steps.cache.outputs.cache-hit != 'true'
run: |
ci-scripts/arm-brew-setup.sh ${{ env.LEVEL_UP }}
ci-scripts/arm-brew-install.sh ${{ env.LEVEL_UP }} libb2 lz4 xz zstd zlib libarchive \
tools/ci-scripts/arm-brew-setup.sh ${{ env.LEVEL_UP }}
tools/ci-scripts/arm-brew-install.sh ${{ env.LEVEL_UP }} libb2 lz4 xz zstd zlib libarchive \
icu4c boost fmt openssl@1.1 libevent libsodium double-conversion \
gflags glog jemalloc

- name: Checkout dwarfs [for build system architecture]
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: tamatebako/dwarfs
path: ${{ env.DWARFS_BUILD }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,20 @@ on:
- 'docs/**'
- '**.adoc'
- '**.md'
- '.github/workflows/alpine.yml'
- '.github/workflows/ubuntu.yml'
- '.github/workflows/macos-arm64.yml'
- '.github/workflows/lint.yml'
pull_request:
branches: [ master ]
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.adoc'
- '**.md'
- '.github/workflows/alpine.yml'
- '.github/workflows/ubuntu.yml'
- '.github/workflows/macos-arm64.yml'
- '.github/workflows/lint.yml'
workflow_dispatch:

env:
Expand All @@ -53,10 +57,10 @@ env:
CXX: clang++
# The folder for dwarfs and other dependenies
DEPS: deps
CACHE_VER: "07"
CACHE_VER: "08"
# GitHub dependencies'
INCBIN_TAG: "348e36b"
DWARFS_TAG: "libdwarfs_wr_v0.1.7"
DWARFS_TAG: "libdwarfs_wr_v0.1.8"
LIBARCHIVE_VER: "3.5.2"
GLOG_TAG: "v0.5.0"
GFLAGS_TAG: "v2.2.2"
Expand Down Expand Up @@ -86,7 +90,7 @@ jobs:
xcode-version: '12.4'

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true

Expand Down Expand Up @@ -127,7 +131,7 @@ jobs:
run: ./wr-tests

- name: Checkout shell test framework
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: kward/shunit2
path: ${{ github.workspace }}/tests/shunit2
Expand All @@ -150,6 +154,8 @@ jobs:
needs: build
name: Run MacOS-10.15 binaries on MacOS-11.0
runs-on: macos-11.0
env:
TEBAKO_CROSS_TEST: ON
strategy:
fail-fast: false
steps:
Expand Down
Loading