diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 01bff81da..fdf1e1237 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: @@ -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: @@ -200,6 +200,20 @@ 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: | @@ -207,14 +221,9 @@ jobs: 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 diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 8ec300e7f..7dcecc2f7 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -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/clang-format-action@v4.6.2 diff --git a/docker/abicheck.sh b/docker/abicheck.sh index aee07a3d2..69dd20650 100644 --- a/docker/abicheck.sh +++ b/docker/abicheck.sh @@ -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} \ diff --git a/docker/abicheck_ubuntu-18.04/Dockerfile b/docker/abicheck_ubuntu-18.04/Dockerfile index a67016e8a..b0d4d947f 100644 --- a/docker/abicheck_ubuntu-18.04/Dockerfile +++ b/docker/abicheck_ubuntu-18.04/Dockerfile @@ -15,6 +15,8 @@ RUN \ apt-get install -y \ cmake \ ninja-build \ + curl \ + unzip \ clang-10 \ python3-pip \ gcc-8-multilib \ diff --git a/docker/abicheck_ubuntu-18.04/docker-entrypoint.sh b/docker/abicheck_ubuntu-18.04/docker-entrypoint.sh index 85c5220f6..362aad6a5 100644 --- a/docker/abicheck_ubuntu-18.04/docker-entrypoint.sh +++ b/docker/abicheck_ubuntu-18.04/docker-entrypoint.sh @@ -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