Skip to content

Commit 67ae509

Browse files
committed
格式化
1 parent 7c561bf commit 67ae509

File tree

3 files changed

+102
-88
lines changed

3 files changed

+102
-88
lines changed

.github/workflows/gcc.yml

Lines changed: 89 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -6,90 +6,105 @@
66
name: gcc
77

88
on:
9-
push:
10-
branches: ["master"]
11-
pull_request:
12-
branches: ["master"]
9+
push:
10+
branches: ["master"]
11+
pull_request:
12+
branches: ["master"]
1313

1414
env:
15-
# Path to the solution file relative to the root of the project.
16-
SOLUTION_FILE_PATH: .
15+
# Path to the solution file relative to the root of the project.
16+
SOLUTION_FILE_PATH: .
1717

18-
# Configuration type to build.
19-
# You can convert this to a build matrix if you need coverage of multiple configuration types.
20-
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
21-
BUILD_CONFIGURATION: Release
18+
# Configuration type to build.
19+
# You can convert this to a build matrix if you need coverage of multiple configuration types.
20+
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
21+
BUILD_CONFIGURATION: Release
2222

2323
permissions:
24-
contents: read
24+
contents: read
2525

2626
jobs:
27-
build:
28-
runs-on: ubuntu-latest
27+
build:
28+
runs-on: ubuntu-latest
2929

30-
steps:
31-
- uses: actions/checkout@v3
32-
- uses: actions/cache@v3
33-
with:
30+
steps:
31+
- uses: actions/checkout@v3
32+
- uses: actions/cache@v3
33+
with:
3434
path: |
3535
~/.deno
3636
~/.cache/deno
3737
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }}-${{ hashFiles('**/import_map.json') }}
38-
- uses: actions/cache@v3
39-
id: cache-gcc-13
40-
with:
41-
path: |
42-
/opt/gcc-latest/
43-
44-
key: ${{ runner.os }}-gcc-13
45-
- uses: actions/cache@v3
46-
with:
47-
path: |
48-
/usr/local/share/vcpkg
49-
./vcpkg
50-
51-
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/xmake.lua') }}
52-
- uses: actions/cache@v3
53-
with:
54-
path: |
55-
~\.xmake
56-
57-
key: ${{ runner.os }}-xmake-${{ hashFiles('**/xmake.lua') }}
58-
59-
- name: install-gcc-13
60-
if: steps.cache-gcc-13.outputs.cache-hit != 'true'
61-
run: |
62-
wget http://kayari.org/gcc-latest/gcc-latest.deb && sudo dpkg -i gcc-latest.deb && rm gcc-latest.deb
63-
- run: |
64-
export PATH=/opt/gcc-latest/bin:$PATH
65-
export LD_RUN_PATH=/opt/gcc-latest/lib64
66-
echo 'export PATH="/opt/gcc-latest/bin:$PATH"' >> ~/.profile
67-
68-
- name: vcpkg-action
69-
70-
uses: johnwason/vcpkg-action@v4
71-
with:
72-
triplet: x64-linux-release
73-
pkgs: "gtest cppunit"
74-
75-
token: ${{ github.token }}
76-
- name: Setup Deno
77-
78-
uses: denoland/setup-deno@v1.1.0
79-
with:
38+
- uses: actions/cache@v3
39+
id: cache-gcc-13
40+
with:
41+
path: |
42+
/opt/gcc-latest/
43+
44+
key: ${{ runner.os }}-gcc-13
45+
- uses: actions/cache@v3
46+
with:
47+
path: |
48+
/usr/local/share/vcpkg
49+
./vcpkg
50+
51+
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/xmake.lua') }}
52+
- uses: actions/cache@v3
53+
with:
54+
path: |
55+
~\.xmake
56+
57+
key: ${{ runner.os }}-xmake-${{ hashFiles('**/xmake.lua') }}
58+
59+
- name: install-gcc-13
60+
if: steps.cache-gcc-13.outputs.cache-hit != 'true'
61+
run: |
62+
wget http://kayari.org/gcc-latest/gcc-latest.deb && sudo dpkg -i gcc-latest.deb && rm gcc-latest.deb
63+
- run: |
64+
sudo chmod 777 /etc/apt/sources.list
65+
sudo cat >>/etc/apt/sources.list<<EOF
66+
67+
deb http://azure.archive.ubuntu.com/ubuntu/ lunar-proposed main restricted universe multiverse
68+
deb http://azure.archive.ubuntu.com/ubuntu/ lunar main restricted universe multiverse
69+
deb http://azure.archive.ubuntu.com/ubuntu/ lunar-backports main restricted universe multiverse
70+
deb http://azure.archive.ubuntu.com/ubuntu/ lunar-security main restricted universe multiverse
71+
deb http://azure.archive.ubuntu.com/ubuntu/ lunar-updates main restricted universe multiverse
72+
EOF
73+
sudo apt update
74+
sudo apt install gcc-13 g++-13 gcc g++ gcc-13-locales g++-multilib -y
75+
export PATH="/opt/gcc-latest/bin:$PATH"
76+
export LD_RUN_PATH="/opt/gcc-latest/lib64"
77+
echo 'export PATH="/opt/gcc-latest/bin:$PATH"' >> ~/.profile
78+
sudo rm -vf /usr/bin/gcc
79+
sudo ln -sv /opt/gcc-latest/bin/gcc /usr/bin/gcc
80+
sudo rm -vf /usr/bin/g++
81+
sudo ln -sv /opt/gcc-latest/bin/g++ /usr/bin/g++
82+
83+
- name: vcpkg-action
84+
85+
uses: johnwason/vcpkg-action@v4
86+
with:
87+
triplet: x64-linux-release
88+
pkgs: "gtest cppunit"
89+
90+
token: ${{ github.token }}
91+
- name: Setup Deno
92+
93+
uses: denoland/setup-deno@v1.1.0
94+
with:
8095
deno-version: v1.33.1
81-
- run: deno task cache
82-
- uses: xmake-io/github-action-setup-xmake@v1
83-
with:
84-
xmake-version: branch@dev
85-
actions-cache-folder: ".xmake-cache"
86-
87-
- run: xmake l install.lua
88-
- run: deno run -A xmake.ts --mode=test --group=test --toolchain=gcc --sdk=/opt/gcc-latest/
89-
- run: xmake clean -a
90-
- run: xmake f --toolchain=gcc --sdk=/opt/gcc-latest/ -y -v --project=. "--file=./xmake.lua"
91-
- run: xmake build -v -y -w --project=. "--file=./xmake.lua"
92-
- run: xmake clean -a
93-
- run: xmake f --toolchain=gcc --sdk=/opt/gcc-latest/ -y -v --project=. "--file=./xmake.lua" --mode=test
94-
- run: xmake build -v -y -w --project=. "--file=./xmake.lua" --group=test
95-
- run: xmake run --group=test
96+
- run: deno task cache
97+
- uses: xmake-io/github-action-setup-xmake@v1
98+
with:
99+
xmake-version: branch@dev
100+
actions-cache-folder: ".xmake-cache"
101+
102+
- run: xmake l install.lua
103+
- run: deno run -A xmake.ts --mode=test --group=test --toolchain=gcc --sdk=/opt/gcc-latest/
104+
- run: xmake clean -a
105+
- run: xmake f --toolchain=gcc --sdk=/opt/gcc-latest/ -y -v --project=. "--file=./xmake.lua"
106+
- run: xmake build -v -y -w --project=. "--file=./xmake.lua"
107+
- run: xmake clean -a
108+
- run: xmake f --toolchain=gcc --sdk=/opt/gcc-latest/ -y -v --project=. "--file=./xmake.lua" --mode=test
109+
- run: xmake build -v -y -w --project=. "--file=./xmake.lua" --group=test
110+
- run: xmake run --group=test

.github/workflows/llvm.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
- uses: actions/cache@v3
1919
id: cache-llvm-16
2020
with:
21-
path: |
22-
/usr/local/opt/llvm
23-
24-
/usr/local/Cellar/llvm/
25-
key: ${{ runner.os }}-llvm-16
21+
path: |
22+
/usr/local/opt/llvm
23+
24+
/usr/local/Cellar/llvm/
25+
key: ${{ runner.os }}-llvm-16
2626
- uses: actions/cache@v3
2727
with:
2828
path: |
@@ -43,7 +43,6 @@ jobs:
4343
~/.deno
4444
~/Library/Caches/deno
4545
- name: Install LLVM and Clang
46-
4746
if: ${{ steps.cache-llvm-16.outputs.cache-hit!= 'true' }}
4847
run: brew install llvm@16
4948
- name: install

.github/workflows/udd.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ jobs:
7676
- name: Update dependencies
7777

7878
run: deno run -A https://deno.land/x/udd/main.ts deps.ts *.ts '*/*.ts' '*.json'
79-
# - name: Use Node.js ${{ matrix.node-version }}
80-
# uses: actions/setup-node@v3
81-
# with:
82-
# node-version: ${{ matrix.node-version }}
83-
# - run: |
84-
# npm i -g cnpm
85-
# npx cnpm i
86-
# npx -y prettier --w */*/*.yml */*.yml
79+
# - name: Use Node.js ${{ matrix.node-version }}
80+
# uses: actions/setup-node@v3
81+
# with:
82+
# node-version: ${{ matrix.node-version }}
83+
# - run: |
84+
# npm i -g cnpm
85+
# npx cnpm i
86+
# npx -y prettier --w */*/*.yml */*.yml
8787
- name: Create Pull Request
8888
uses: peter-evans/create-pull-request@v3
8989
id: pr

0 commit comments

Comments
 (0)