Skip to content

Commit

Permalink
Linux CI build using Ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Oct 12, 2024
1 parent 9d13e9d commit 36c55d9
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 10 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/linuxbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@ name: Build for Linux
on: [ push, pull_request ]

env:
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
DEBIAN_FRONTEND: noninteractive

jobs:
build_linux:
name: CI for Linux
runs-on: ubuntu-latest
container: ubuntu:16.04
container: ubuntu:20.04
steps:
- name: Install dependencies for Linux
run: |
apt-get -qq update
apt-get install -y -qq autopoint automake autoconf intltool libc6-dev yasm libglib2.0-bin perl wget zip bzip2 make libtool pkg-config fakeroot clang openssh-client rsync
apt-get install -y -qq autopoint automake autoconf intltool libc6-dev yasm libglib2.0-bin perl wget zip bzip2 make libtool pkg-config fakeroot clang openssh-client rsync libglib2.0-dev-bin
sed -i 's/mozilla\/DST_Root_CA_X3\.crt/\!mozilla\/DST_Root_CA_X3\.crt/' /etc/ca-certificates.conf
update-ca-certificates
- name: Checkout for Linux
Expand All @@ -33,9 +32,9 @@ jobs:
gh_ed25519_key: ${{ secrets.GH_ENCRYPTED_ED25519_KEY }}
gh_ed25519_iv: ${{ secrets.GH_ENCRYPTED_ED25519_IV }}
run: TRAVIS_OS_NAME=linux travis/upload.sh
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: linux
# path: portable_out/build/*.tar.bz2
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: linux
path: portable_out/build/*.tar.bz2

2 changes: 1 addition & 1 deletion external/apbuild
Submodule apbuild updated 1 files
+2 −1 apinit
9 changes: 9 additions & 0 deletions tools/docker/20.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM deadbeef-builder-player-clang-20.04

WORKDIR /usr/src/deadbeef
COPY . /usr/src/deadbeef
ENV TRAVIS_OS_NAME=linux

RUN rm -rf m4
RUN rm ltmain.sh
CMD [ "bash", "travis/build.sh", "--clang" ]
6 changes: 6 additions & 0 deletions tools/docker/20.04/Dockerfile-builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ubuntu:focal
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -qq update
RUN apt-get install -y -qq autopoint automake autoconf intltool libc6-dev yasm libglib2.0-dev-bin perl wget zip bzip2 make libtool pkg-config fakeroot clang libblocksruntime-dev libdispatch-dev

14 changes: 14 additions & 0 deletions tools/docker/20.04/Dockerfile-distcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM deadbeef-builder-player-clang-20.04

WORKDIR /usr/src/deadbeef
COPY . /usr/src/deadbeef
ENV TRAVIS_OS_NAME=linux

RUN apt-get -qq update
RUN apt-get install -y -qq libjansson-dev

RUN rm -rf m4
RUN rm ltmain.sh
RUN ./autogen.sh
RUN CC=clang CXX=clang++ ./configure
RUN CC=clang CXX=clang++ make distcheck
12 changes: 12 additions & 0 deletions tools/docker/20.04/Dockerfile-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM ubuntu:focal

WORKDIR /usr/src/deadbeef
COPY docker-artifacts/x86_64/deadbeef-devel /usr/src/deadbeef

RUN apt-get -qq update
RUN apt-get install -y -qq libgtk2.0-0 libasound2 libpulse0 libgtk-3-0 libdispatch0

RUN timeout -k 20s 20s /usr/src/deadbeef/deadbeef > /usr/src/deadbeef/log.txt
RUN cat /usr/src/deadbeef/log.txt


7 changes: 7 additions & 0 deletions tools/docker/20.04/Dockerfile-unittest
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM deadbeef-builder-player-clang-20.04

WORKDIR /usr/src/deadbeef
COPY . /usr/src/deadbeef
ENV TRAVIS_OS_NAME=linux

CMD [ "bash", "scripts/test.sh"]
6 changes: 6 additions & 0 deletions tools/docker/20.04/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

# run this script once to create the base container image,
# which would contain all necessary dependencies and build tools

docker build --progress plain -f tools/docker/20.04/Dockerfile-builder -t deadbeef-builder-player-clang-20.04 .
5 changes: 5 additions & 0 deletions tools/docker/20.04/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

docker build --progress plain -t deadbeef-clang-20.04 -f tools/docker/20.04/Dockerfile . || exit 1
mkdir -p docker-artifacts
docker run --rm -v ${PWD}/docker-artifacts:/usr/src/deadbeef/portable deadbeef-clang-20.04 || exit 1
7 changes: 7 additions & 0 deletions tools/docker/20.04/distcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

set -e

docker build --progress plain -t deadbeef-clang-distcheck-20.04 -f tools/docker/20.04/Dockerfile-distcheck .
mkdir -p docker-artifacts
docker run -i --rm -v ${PWD}/docker-artifacts:/usr/src/deadbeef/portable deadbeef-clang-distcheck-20.04
5 changes: 5 additions & 0 deletions tools/docker/20.04/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

docker build --progress plain -t deadbeef-test-20.04 -f tools/docker/20.04/Dockerfile-test . || exit 1
docker run --rm deadbeef-test-20.04 || exit 1

7 changes: 7 additions & 0 deletions tools/docker/20.04/unittest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

set -e

docker build --progress plain -t deadbeef-clang-unittest-20.04 -f tools/docker/20.04/Dockerfile-unittest .
mkdir -p docker-artifacts
docker run -i --rm -v ${PWD}/docker-artifacts:/usr/src/deadbeef/portable deadbeef-clang-unittest-20.04

0 comments on commit 36c55d9

Please sign in to comment.