|
6 | 6 | name: gcc
|
7 | 7 |
|
8 | 8 | on:
|
9 |
| - push: |
10 |
| - branches: ["master"] |
11 |
| - pull_request: |
12 |
| - branches: ["master"] |
| 9 | + push: |
| 10 | + branches: ["master"] |
| 11 | + pull_request: |
| 12 | + branches: ["master"] |
13 | 13 |
|
14 | 14 | 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: . |
17 | 17 |
|
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 |
22 | 22 |
|
23 | 23 | permissions:
|
24 |
| - contents: read |
| 24 | + contents: read |
25 | 25 |
|
26 | 26 | jobs:
|
27 |
| - build: |
28 |
| - runs-on: ubuntu-latest |
| 27 | + build: |
| 28 | + runs-on: ubuntu-latest |
29 | 29 |
|
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: |
34 | 34 | path: |
|
35 | 35 | ~/.deno
|
36 | 36 | ~/.cache/deno
|
37 | 37 | 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: |
80 | 95 | 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 |
0 commit comments