Attempt to cross-compile for arm64 Linux

This commit is contained in:
Siarhei Fedartsou 2022-10-15 13:07:23 +02:00
parent 5bc283d6b2
commit 8e27ddf6bf

View File

@ -20,84 +20,84 @@ env:
ENABLE_NODE_BINDINGS: "ON" ENABLE_NODE_BINDINGS: "ON"
jobs: jobs:
windows: # windows:
needs: format-taginfo-docs # needs: format-taginfo-docs
runs-on: windows-2022 # runs-on: windows-2022
continue-on-error: false # continue-on-error: false
env: # env:
BUILD_TYPE: Release # BUILD_TYPE: Release
ENABLE_APPLE_SILICON: "OFF" # ENABLE_APPLE_SILICON: "OFF"
steps: # steps:
- uses: actions/checkout@v3 # - uses: actions/checkout@v3
- run: pip install conan==1.53.0 # - run: pip install conan==1.53.0
- run: conan --version # - run: conan --version
- run: cmake --version # - run: cmake --version
- uses: actions/setup-node@v3 # - uses: actions/setup-node@v3
with: # with:
node-version: 16 # node-version: 16
- run: node --version # - run: node --version
- run: npm --version # - run: npm --version
- name: Prepare environment # - name: Prepare environment
shell: bash # shell: bash
run: | # run: |
PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)") # PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")
echo PUBLISH=$([[ "${GITHUB_REF:-}" == "refs/tags/v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") >> $GITHUB_ENV # echo PUBLISH=$([[ "${GITHUB_REF:-}" == "refs/tags/v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") >> $GITHUB_ENV
- run: npm install --ignore-scripts # - run: npm install --ignore-scripts
- run: npm link --ignore-scripts # - run: npm link --ignore-scripts
- uses: microsoft/setup-msbuild@v1.1 # - uses: microsoft/setup-msbuild@v1.1
- name: Build # - name: Build
run: | # run: |
.\scripts\ci\windows-build.bat # .\scripts\ci\windows-build.bat
- name: Run node tests # - name: Run node tests
shell: bash # shell: bash
run: | # run: |
./lib/binding/osrm-datastore.exe test/data/ch/monaco.osrm # ./lib/binding/osrm-datastore.exe test/data/ch/monaco.osrm
node test/nodejs/index.js # node test/nodejs/index.js
- name: Build Node package # - name: Build Node package
shell: bash # shell: bash
run: ./scripts/ci/node_package.sh # run: ./scripts/ci/node_package.sh
- name: Publish Node package # - name: Publish Node package
if: ${{ env.PUBLISH == 'On' }} # if: ${{ env.PUBLISH == 'On' }}
uses: ncipollo/release-action@v1 # uses: ncipollo/release-action@v1
with: # with:
allowUpdates: true # allowUpdates: true
artifactErrorsFailBuild: true # artifactErrorsFailBuild: true
artifacts: build/stage/**/*.tar.gz # artifacts: build/stage/**/*.tar.gz
omitBody: true # omitBody: true
omitBodyDuringUpdate: true # omitBodyDuringUpdate: true
omitName: true # omitName: true
omitNameDuringUpdate: true # omitNameDuringUpdate: true
replacesArtifacts: true # replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }} # token: ${{ secrets.GITHUB_TOKEN }}
format-taginfo-docs: # format-taginfo-docs:
runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
steps: # steps:
- uses: actions/checkout@v2 # - uses: actions/checkout@v2
- name: Use Node.js # - name: Use Node.js
uses: actions/setup-node@v3 # uses: actions/setup-node@v3
with: # with:
node-version: 12 # node-version: 12
- name: Enable Node.js cache # - name: Enable Node.js cache
uses: actions/cache@v2 # uses: actions/cache@v2
with: # with:
path: ~/.npm # path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-node- # ${{ runner.os }}-node-
- name: Prepare environment # - name: Prepare environment
run: | # run: |
npm ci --ignore-scripts # npm ci --ignore-scripts
clang-format-10 --version # clang-format-10 --version
- name: Run checks # - name: Run checks
run: | # run: |
./scripts/check_taginfo.py taginfo.json profiles/car.lua # ./scripts/check_taginfo.py taginfo.json profiles/car.lua
./scripts/format.sh && ./scripts/error_on_dirty.sh # ./scripts/format.sh && ./scripts/error_on_dirty.sh
node ./scripts/validate_changelog.js # node ./scripts/validate_changelog.js
npm run docs && ./scripts/error_on_dirty.sh # npm run docs && ./scripts/error_on_dirty.sh
docker-image: docker-image:
needs: format-taginfo-docs # needs: format-taginfo-docs
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
continue-on-error: false continue-on-error: false
steps: steps:
@ -385,8 +385,8 @@ jobs:
node: 16 node: 16
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Release BUILD_TYPE: Release
CCOMPILER: aarch64-linux-gnu-gcc CCOMPILER: /usr/bin/aarch64-linux-gnu-gcc
CXXCOMPILER: aarch64-linux-gnu-g++ CXXCOMPILER: /usr/bin/aarch64-linux-gnu-g++
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -625,7 +625,7 @@ jobs:
tar zxvf onetbb.tgz tar zxvf onetbb.tgz
sudo cp -a oneapi-tbb-${TBB_VERSION}/lib/. /usr/local/lib/ sudo cp -a oneapi-tbb-${TBB_VERSION}/lib/. /usr/local/lib/
sudo cp -a oneapi-tbb-${TBB_VERSION}/include/. /usr/local/include/ sudo cp -a oneapi-tbb-${TBB_VERSION}/include/. /usr/local/include/
- run: ls -R /usr/bin/
- name: Prepare build - name: Prepare build
run: | run: |
mkdir ${OSRM_BUILD_DIR} mkdir ${OSRM_BUILD_DIR}