Skip to content

Commit

Permalink
Fix abi-check CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Hual committed Jan 10, 2023
1 parent 2a14750 commit d6eb98e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
if-no-files-found: error

build-linux-static:
name: Linux x86 dynssl build
name: Linux x86 build
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
if-no-files-found: error

build-linux:
name: Linux x86 build
name: Linux x86 dynssl build
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -200,21 +200,30 @@ jobs:
clean: true
submodules: recursive
fetch-depth: 0

- name: Declare build variables
id: vars
shell: bash
env:
HEAD_REF: ${{ github.head_ref || github.ref_name }}
run: |
echo "build_version=$(git describe --always --tags "refs/remotes/origin/${HEAD_REF}")" >> $GITHUB_OUTPUT
- uses: actions/download-artifact@v3
id: download
with:
name: open.mp-linux-dynssl-${{ steps.vars.outputs.build_version }}
path: docker/ref

- name: Set ownership
run: |
# this is to fix GIT not liking owner of the checkout dir
chown -R $(id -u):$(id -g) $PWD
- name: Build & run abi-check
env:
HEAD_REF: ${{ github.head_ref || github.ref_name }}
shell: bash
run: |
ref_version=$(git describe --always --tags "refs/remotes/origin/${HEAD_REF}")
ref_archive_name="open.mp-linux-snapshot-${ref_version}.tar.xz"
master_version=$(git describe --always --tags "refs/remotes/origin/master")
master_archive_name="open.mp-linux-snapshot-${master_version}.tar.xz"
cd docker
chmod +x ./abicheck.sh
chmod +x ./abicheck_ubuntu-18.04/docker-entrypoint.sh
CONFIG=RelWithDebInfo REF_ARCHIVE="${ref_archive_name}" MASTER_ARCHIVE="${master_archive_name}" UBUNTU_VERSION=18.04 BUILD_SERVER=0 BUILD_TOOLS=1 ./abicheck.sh
CONFIG=RelWithDebInfo REF_ARCHIVE="open.mp-linux-dynssl-${{ steps.vars.outputs.build_version }}.tar.xz" UBUNTU_VERSION=18.04 BUILD_SERVER=0 BUILD_TOOLS=1 ./abicheck.sh
1 change: 0 additions & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
with:
clean: true
submodules: recursive
token: ${{ secrets.CI_TOKEN }}

- name: Run clang-format style check for C/C++ programs.
uses: jidicula/[email protected]
Expand Down
1 change: 1 addition & 0 deletions docker/abicheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ docker run \
-v $PWD/..:/code \
-v $PWD/build:/code/build \
-v $PWD/conan:/home/user/.conan \
-v $PWD/ref:/ref \
-e CONFIG=${config} \
-e TARGET_BUILD_ARCH=${target_build_arch} \
-e BUILD_SHARED=${build_shared} \
Expand Down
2 changes: 2 additions & 0 deletions docker/abicheck_ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ RUN \
apt-get install -y \
cmake \
ninja-build \
curl \
unzip \
clang-10 \
python3-pip \
gcc-8-multilib \
Expand Down
9 changes: 5 additions & 4 deletions docker/abicheck_ubuntu-18.04/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ cmake \

cd build/Output/*/Tools
echo "Fetching ref artifacts"
wget -O "./ref.tar.xz" "https://tms-server.com/open.mp-snapshots-CPWt44s0xqBIWOwk2B0NJi76zoq5dFMJ/$REF_ARCHIVE"
echo "Fetching master artifacts"
wget -O "./master.tar.xz" "https://tms-server.com/open.mp-snapshots-CPWt44s0xqBIWOwk2B0NJi76zoq5dFMJ/$MASTER_ARCHIVE"
url=$(curl https://nightly.link/openmultiplayer/open.mp/workflows/build/master | grep -oP '(?<=")https://nightly.link/openmultiplayer/open.mp/workflows/build/master/open.mp-linux-dynssl.*\.zip(?=")')
curl -L $url -o master.zip
for z in master.zip; do unzip "$z"; mv "$(unzip -Z1 $z)" "master.tar.xz"; done
echo "Extracting ref artifacts"
mkdir -p ref && tar -xvf "./ref.tar.xz" -C ref
ls /ref
mkdir -p ref && tar -xvf "/ref/$REF_ARCHIVE" -C ref
echo "Extracting master artifacts"
mkdir -p master && tar -xvf "./master.tar.xz" -C master

Expand Down

0 comments on commit d6eb98e

Please sign in to comment.