File: loongarch64.yml

package info (click to toggle)
simdjson 4.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 31,400 kB
  • sloc: cpp: 195,760; ansic: 20,954; sh: 1,126; python: 885; makefile: 47; ruby: 25; javascript: 13
file content (50 lines) | stat: -rw-r--r-- 1,768 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: LoongArch64-CI

on: [push, pull_request]

jobs:
  loongarch64:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        platform:
          - { toolchain-version: 2023.08.08 }
    steps:
      - uses: actions/checkout@v4
      - name: Install build requirements
        run: |
          sudo apt-get update -y
          sudo apt-get install -y --no-install-recommends cmake

      - uses: actions/cache/restore@v4
        id: restore-cache
        with:
          path: /opt/cross-tools
          key: loongarch64-${{ matrix.platform.toolchain-version }}

      - name: Download LoongArch64 gcc+glibc toolchain
        if: ${{ !steps.restore-cache.outputs.cache-hit }}
        run: |
          url="https://github.com/loongson/build-tools/releases/download/${{ matrix.platform.toolchain-version }}/x86_64-cross-tools-loongarch64-gcc-libc.tar.xz"

          wget "$url" -O /tmp/toolchain.tar.xz

          mkdir -p /opt
          tar -C /opt -x -f /tmp/toolchain.tar.xz

      - uses: actions/cache/save@v3
        if: ${{ !steps.restore-cache.outputs.cache-hit }}
        with:
          path: /opt/cross-tools
          key: loongarch64-${{ matrix.platform.toolchain-version }}

      - name: setup Loongarch64 build environment
        run: |
          echo "/opt/cross-tools/bin" >> $GITHUB_PATH
          echo "CC=loongarch64-unknown-linux-gnu-gcc" >> $GITHUB_ENV
          echo "CXX=loongarch64-unknown-linux-gnu-g++" >> $GITHUB_ENV
      - name: configure
        run: cmake -B build -DCMAKE_SYSTEM_PROCESSOR=loongarch64 -DARCH=lonngarch64 -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=loongarch64-unknown-linux-gnu-gcc -DCMAKE_CXX_COMPILER=loongarch64-unknown-linux-gnu-g++
      - name: build
        run: cmake --build build