Skip to content

Commit c82cca0

Browse files
committed
ci: use loongson official cross toolchains
1 parent eed266d commit c82cca0

File tree

2 files changed

+35
-8
lines changed

2 files changed

+35
-8
lines changed

.github/workflows/loongarch64.yml

+33-6
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,46 @@ concurrency:
99
jobs:
1010
loongarch64:
1111
runs-on: ubuntu-latest
12-
container:
13-
image: yinshiyou01/ubuntu-la64-cross-gcc:v0
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
platform:
16+
- { toolchain-version: 2022.09.06 }
1417
steps:
1518
- uses: actions/checkout@v3
1619
- name: Install build requirements
1720
run: |
18-
apt-get update -y
19-
apt-get install -y cmake ninja-build pkg-config
20-
- name: Configure environment
21+
sudo apt-get update -y
22+
sudo apt-get install -y --no-install-recommends cmake ninja-build pkg-config tar wget
23+
24+
- uses: actions/cache/restore@v3
25+
id: restore-cache
26+
with:
27+
path: /opt/cross-tools
28+
key: loongarch64-${{ matrix.platform.toolchain-version }}
29+
30+
- name: Download LoongArch64 gcc+glibc toolchain
31+
if: ${{ !steps.restore-cache.outputs.cache-hit }}
32+
run: |
33+
url="https://github.com/loongson/build-tools/releases/download/${{ matrix.platform.toolchain-version }}/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz"
34+
35+
wget "$url" -O /tmp/toolchain.tar.xz
36+
37+
mkdir -p /opt
38+
tar -C /opt -x -f /tmp/toolchain.tar.xz
39+
40+
- uses: actions/cache/save@v3
41+
if: ${{ !steps.restore-cache.outputs.cache-hit }}
42+
with:
43+
path: /opt/cross-tools
44+
key: loongarch64-${{ matrix.platform.toolchain-version }}
45+
46+
- name: Set-up Loongarch64 build environment
2147
run: |
22-
echo "/usr/local/cross-tools/bin" >> $GITHUB_PATH
48+
echo "/opt/cross-tools/bin" >> $GITHUB_PATH
2349
echo "CC=loongarch64-unknown-linux-gnu-gcc" >> $GITHUB_ENV
2450
echo "CXX=loongarch64-unknown-linux-gnu-g++" >> $GITHUB_ENV
51+
2552
- name: Configure (CMake)
2653
run: |
2754
cmake -S . -B build -G Ninja \

.github/workflows/vita.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
platform:
23-
- { name: Vita (GLES w/ pib), os: windows-latest, pib: true, version: 1.1.4, artifact: SDL-vita-pib }
24-
- { name: Vita (GLES w/ PVR_PSP2 + gles4vita), os: windows-latest, pvr: true, version: 3.9, artifact: SDL-vita-pvr }
23+
- { name: Vita (GLES w/ pib), pib: true, version: 1.1.4, artifact: SDL-vita-pib }
24+
- { name: Vita (GLES w/ PVR_PSP2 + gles4vita), pvr: true, version: 3.9, artifact: SDL-vita-pvr }
2525

2626
steps:
2727
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)