revert back shared lib of zmq for the use of cppzmq #424
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NES Dependencies builder | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-linux: | |
timeout-minutes: 360 | |
name: ${{ matrix.osversion }} ${{ matrix.arch }} | |
runs-on: [self-hosted, linux, '${{ matrix.arch }}', dep-builder] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- osversion: ubuntu-24.04 | |
arch: "x64" | |
force_system_binary: 0 | |
- osversion: ubuntu-20.04 | |
arch: "x64" | |
force_system_binary: 0 | |
- osversion: ubuntu-22.04 | |
arch: "x64" | |
force_system_binary: 0 | |
- osversion: ubuntu-24.04 | |
arch: "arm64" | |
force_system_binary: 1 | |
- osversion: ubuntu-20.04 | |
arch: "arm64" | |
force_system_binary: 1 | |
- osversion: ubuntu-22.04 | |
arch: "arm64" | |
force_system_binary: 1 | |
- osversion: rocky-8.7 | |
arch: "arm64" | |
force_system_binary: 1 | |
env: | |
VCPKG_DEP_LIST: ${{ matrix.arch }}-linux | |
VCPKG_FORCE_SYSTEM_BINARIES: ${{ matrix.force_system_binary }} | |
VCPKG_FEATURE_FLAGS: -binarycaching | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Checkout vcpkg submodules | |
working-directory: ${{ github.workspace }}/vcpkg/ | |
run: git fetch --unshallow || true | |
- name: Set output vars to the actual tag name | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Build Docker | |
id: builddocker | |
working-directory: ${{ github.workspace }}/docker/ | |
run: | | |
docker build \ | |
-t nes_dep_build_${{ matrix.osversion }} \ | |
-f Dockerfile-${{ matrix.osversion }} \ | |
. | |
- name: Install vcpkg | |
id: bootstrapvcpkg | |
run: | | |
docker run \ | |
-u $(id -u ${USER}):$(id -g ${USER}) \ | |
-e ARCH=${{ matrix.arch }} \ | |
-v ${{ github.workspace }}:/build_dir \ | |
--rm \ | |
nes_dep_build_${{ matrix.osversion }} /build_dir/vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
shell: bash | |
- name: Install dependencies in manifest mode | |
id: installdeps | |
run: | | |
docker run \ | |
-u $(id -u ${USER}):$(id -g ${USER}) \ | |
-e ARCH=${{ matrix.arch }} \ | |
-v ${{ github.workspace }}:/build_dir \ | |
--rm \ | |
nes_dep_build_${{ matrix.osversion }} /build_dir/vcpkg/vcpkg install \ | |
--triplet=${{ env.VCPKG_DEP_LIST }}-nes \ | |
--host-triplet=${{ env.VCPKG_DEP_LIST }}-nes \ | |
--overlay-triplets=/build_dir/custom-triplets/ \ | |
--x-manifest-root=/build_dir/ \ | |
--overlay-ports=/build_dir/vcpkg-registry/ports | |
- name: Compress artifacts | |
id: compressdeps | |
run: | | |
mkdir nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes && \ | |
mv \ | |
${{ github.workspace }}/vcpkg_installed \ | |
nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes/installed && \ | |
mkdir -p nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes/scripts/buildsystems && \ | |
cp \ | |
${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ | |
${{ github.workspace }}/nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes/scripts/buildsystems/ && \ | |
touch ${{ github.workspace }}/nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes/.vcpkg-root && \ | |
7z a -mx9 -aoa \ | |
nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-${{ matrix.osversion }}-nes.7z \ | |
nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
id: createrelease | |
with: | |
files: | | |
nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-${{ matrix.osversion }}-nes.7z | |
- name: Upload GitHub Actions artifact of vcpkg build logs | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
id: uploadlogs | |
with: | |
name: vcpkg-logs-${{ env.VCPKG_DEP_LIST }} | |
path: ${{ github.workspace }}/vcpkg/buildtrees/**/*.log | |
- name: Clean build artifacts | |
id: cleanbuildartifacts | |
if: always() | |
run: | | |
rm -rf nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes \ | |
nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-${{ matrix.osversion }}-nes.7z \ | |
${{ github.workspace }}/vcpkg/{buildtrees,downloads,packages} | |
- name: Remove docker image | |
id: removedockerimage | |
if: always() | |
run: | | |
test -n "$(docker image ls -q nes_dep_build_${{ matrix.osversion }})" && \ | |
docker image rm $(docker image ls -q nes_dep_build_${{ matrix.osversion }}) || \ | |
true | |
build-osx: | |
timeout-minutes: 360 | |
name: osx ${{ matrix.arch }} | |
runs-on: [self-hosted, macOS, '${{ matrix.arch }}'] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: "x64" | |
- arch: "arm64" | |
env: | |
VCPKG_DEP_LIST: ${{ matrix.arch }}-osx | |
VCPKG_FEATURE_FLAGS: -binarycaching | |
steps: | |
- uses: lukka/get-cmake@latest | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Checkout vcokg submodules | |
working-directory: ${{ github.workspace }}/vcpkg/ | |
run: git fetch --unshallow || true | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
architecture: x64 | |
- name: Set output vars to the actual tag name | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Install vcpkg | |
id: bootstrapvcpkg | |
run: | | |
${{ github.workspace }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
shell: bash | |
- name: Install dependencies in manifest mode | |
id: installdeps | |
run: | | |
${{ github.workspace }}/vcpkg/vcpkg install --triplet=${{ env.VCPKG_DEP_LIST }}-nes --host-triplet=${{ env.VCPKG_DEP_LIST }}-nes --overlay-triplets=custom-triplets/ --overlay-ports=vcpkg-registry/ports | |
- name: Compress artifacts | |
id: compressdeps | |
run: | | |
mkdir nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes && \ | |
mv ${{ github.workspace }}/vcpkg_installed nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes/installed && \ | |
mkdir -p nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes/scripts/buildsystems && \ | |
cp ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ github.workspace }}/nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes/scripts/buildsystems/ && \ | |
touch ${{ github.workspace }}/nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes/.vcpkg-root && \ | |
7z a nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes.7z nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes -mx9 -aoa | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
id: createrelease | |
with: | |
files: | | |
nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes.7z | |
- name: Upload GitHub Actions artifact of vcpkg build logs | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
id: uploadlogs | |
with: | |
name: vcpkg-logs-${{ env.VCPKG_DEP_LIST }} | |
path: ${{ github.workspace }}/vcpkg/buildtrees/**/*.log | |
- name: Clean build artifacts | |
id: cleanbuildartifacts | |
if: always() | |
run: | | |
rm -rf nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes \ | |
nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-${{ matrix.osversion }}-nes.7z \ | |
${{ github.workspace }}/vcpkg/{buildtrees,downloads,packages} |