mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-30 05:18:13 +08:00
ci: use loongson official cross toolchains
This commit is contained in:
@@ -9,19 +9,46 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
loongarch64:
|
loongarch64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
strategy:
|
||||||
image: yinshiyou01/ubuntu-la64-cross-gcc:v0
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- { toolchain-version: 2022.09.06 }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install build requirements
|
- name: Install build requirements
|
||||||
run: |
|
run: |
|
||||||
apt-get update -y
|
sudo apt-get update -y
|
||||||
apt-get install -y cmake ninja-build pkg-config
|
sudo apt-get install -y --no-install-recommends cmake ninja-build pkg-config tar wget
|
||||||
- name: Configure environment
|
|
||||||
|
- uses: actions/cache/restore@v3
|
||||||
|
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: |
|
run: |
|
||||||
echo "/usr/local/cross-tools/bin" >> $GITHUB_PATH
|
url="https://github.com/loongson/build-tools/releases/download/${{ matrix.platform.toolchain-version }}/loongarch64-clfs-6.3-cross-tools-gcc-glibc.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: Set-up Loongarch64 build environment
|
||||||
|
run: |
|
||||||
|
echo "/opt/cross-tools/bin" >> $GITHUB_PATH
|
||||||
echo "CC=loongarch64-unknown-linux-gnu-gcc" >> $GITHUB_ENV
|
echo "CC=loongarch64-unknown-linux-gnu-gcc" >> $GITHUB_ENV
|
||||||
echo "CXX=loongarch64-unknown-linux-gnu-g++" >> $GITHUB_ENV
|
echo "CXX=loongarch64-unknown-linux-gnu-g++" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Configure (CMake)
|
- name: Configure (CMake)
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -G Ninja \
|
cmake -S . -B build -G Ninja \
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
- { name: Vita (GLES w/ pib), os: windows-latest, pib: true, version: 1.1.4, artifact: SDL-vita-pib }
|
- { name: Vita (GLES w/ pib), pib: true, version: 1.1.4, artifact: SDL-vita-pib }
|
||||||
- { name: Vita (GLES w/ PVR_PSP2 + gles4vita), os: windows-latest, pvr: true, version: 3.9, artifact: SDL-vita-pvr }
|
- { name: Vita (GLES w/ PVR_PSP2 + gles4vita), pvr: true, version: 3.9, artifact: SDL-vita-pvr }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user