|
8 | 8 | jobs: |
9 | 9 | linux: |
10 | 10 | name: "Linux build" |
11 | | - runs-on: ubuntu-latest |
| 11 | + runs-on: ubuntu-slim |
12 | 12 | env: |
13 | 13 | PREFIX: "/usr" |
14 | 14 | PY3PATH: "" |
15 | 15 | steps: |
16 | 16 | - name: Checkout |
17 | 17 | uses: actions/checkout@v4 |
18 | 18 |
|
19 | | - - name: Install dependencies |
| 19 | + - name: Set up Launchpad PPA |
| 20 | + id: launchpad_ppa |
20 | 21 | run: | |
21 | | - sudo add-apt-repository -y ppa:dciabrin/ngdevkit |
22 | 22 | sudo apt-get update -y |
23 | | - sudo apt-get install -y ngdevkit-toolchain python3 zip pkg-config |
| 23 | + toolchain_version=$(sudo apt-cache policy sox | awk '/Candidate:/ {print $2}') |
| 24 | + arch=$(dpkg --print-architecture) |
| 25 | + echo "toolchain_deb=sox_${toolchain_version}_${arch}.deb" >> "$GITHUB_OUTPUT" |
24 | 26 |
|
25 | | - - name: Build ngdevkit |
26 | | - run: ./.github/scripts/build.sh |
| 27 | + - name: Cache ngdevkit-toolchain package |
| 28 | + uses: actions/cache@v5 |
| 29 | + with: |
| 30 | + path: /tmp/${{ steps.launchpad_ppa.outputs.toolchain_deb }} |
| 31 | + key: ${{ steps.launchpad_ppa.outputs.toolchain_deb }} |
27 | 32 |
|
28 | | - - name: Install dependencies for ngdevkit-examples |
29 | | - run: > |
30 | | - sudo apt-get install -y python3-yaml ngdevkit-gngeo python3-pygame imagemagick |
31 | | - sox libsox-fmt-mp3 libglew-dev libsdl2-dev |
| 33 | + - name: Prepare cached dependency |
| 34 | + run: | |
| 35 | + if [ ! -f /tmp/${{ steps.launchpad_ppa.outputs.toolchain_deb }} ]; then |
| 36 | + cd /tmp && sudo apt-get download sox |
| 37 | + fi |
| 38 | + sudo cp /tmp/${{ steps.launchpad_ppa.outputs.toolchain_deb }} /var/cache/apt/archives |
| 39 | + |
| 40 | + - name: Install dependencies |
| 41 | + run: | |
| 42 | + sudo apt-get install -y sox |
| 43 | + # sudo apt-get install -y ngdevkit-toolchain python3 zip pkg-config |
32 | 44 |
|
33 | | - - name: Test by compiling ngdevkit-examples |
34 | | - run: ./.github/scripts/test.sh |
| 45 | + # - name: Build ngdevkit |
| 46 | + # run: ./.github/scripts/build.sh |
35 | 47 |
|
36 | | - win: |
37 | | - name: "Windows native MSYS2 build" |
38 | | - runs-on: windows-latest |
39 | | - env: |
40 | | - PY3PATH: "" |
41 | | - defaults: |
42 | | - run: |
43 | | - shell: msys2 {0} |
44 | | - steps: |
45 | | - - name: Checkout |
46 | | - uses: actions/checkout@v4 |
47 | | - with: |
48 | | - fetch-depth: 0 |
| 48 | + # - name: Install dependencies for ngdevkit-examples |
| 49 | + # run: > |
| 50 | + # sudo apt-get install -y python3-yaml ngdevkit-gngeo python3-pygame imagemagick |
| 51 | + # sox libsox-fmt-mp3 libglew-dev libsdl2-dev |
49 | 52 |
|
50 | | - - name: Install MSYS2 |
51 | | - uses: msys2/setup-msys2@v2 |
52 | | - with: |
53 | | - msystem: UCRT64 |
54 | | - update: true |
55 | | - install: |
56 | | - git autoconf automake make zip |
57 | | - mingw-w64-ucrt-x86_64-pkg-config mingw-w64-ucrt-x86_64-python |
58 | | - mingw-w64-ucrt-x86_64-python-pygame |
| 53 | + # - name: Test by compiling ngdevkit-examples |
| 54 | + # run: ./.github/scripts/test.sh |
59 | 55 |
|
60 | | - - name: Install ngdevkit dependencies |
61 | | - run: | |
62 | | - echo -e "[ngdevkit]\nSigLevel = Optional TrustAll\nServer = https://dciabrin.net/msys2-ngdevkit/\$arch" >> /etc/pacman.conf |
63 | | - pacman -Sy |
64 | | - pacman -S --disable-download-timeout --noconfirm mingw-w64-ucrt-x86_64-ngdevkit-toolchain |
| 56 | + # win: |
| 57 | + # name: "Windows native MSYS2 build" |
| 58 | + # runs-on: windows-latest |
| 59 | + # env: |
| 60 | + # PY3PATH: "" |
| 61 | + # defaults: |
| 62 | + # run: |
| 63 | + # shell: msys2 {0} |
| 64 | + # steps: |
| 65 | + # - name: Checkout |
| 66 | + # uses: actions/checkout@v4 |
| 67 | + # with: |
| 68 | + # fetch-depth: 0 |
65 | 69 |
|
66 | | - - name: Build |
67 | | - run: ./.github/scripts/build-msys2.sh |
| 70 | + # - name: Install MSYS2 |
| 71 | + # uses: msys2/setup-msys2@v2 |
| 72 | + # with: |
| 73 | + # msystem: UCRT64 |
| 74 | + # update: true |
| 75 | + # install: |
| 76 | + # git autoconf automake make zip |
| 77 | + # mingw-w64-ucrt-x86_64-pkg-config mingw-w64-ucrt-x86_64-python |
| 78 | + # mingw-w64-ucrt-x86_64-python-pygame |
68 | 79 |
|
69 | | - macos: |
70 | | - name: "macOS build" |
71 | | - runs-on: macos-15 |
72 | | - env: |
73 | | - PREFIX: "/opt/homebrew" |
74 | | - PY3PATH: "/opt/homebrew/bin" |
75 | | - steps: |
76 | | - - name: Checkout |
77 | | - uses: actions/checkout@v4 |
| 80 | + # - name: Install ngdevkit dependencies |
| 81 | + # run: | |
| 82 | + # echo -e "[ngdevkit]\nSigLevel = Optional TrustAll\nServer = https://dciabrin.net/msys2-ngdevkit/\$arch" >> /etc/pacman.conf |
| 83 | + # pacman -Sy |
| 84 | + # pacman -S --disable-download-timeout --noconfirm mingw-w64-ucrt-x86_64-ngdevkit-toolchain |
78 | 85 |
|
79 | | - - name: Dependencies |
80 | | - run: | |
81 | | - brew tap dciabrin/ngdevkit |
82 | | - brew install python3 --overwrite |
83 | | - brew install automake ngdevkit-toolchain zip pkg-config sdl2 sdl2_image |
84 | | - $(brew --prefix python)/libexec/bin/pip install pygame --break-system-packages |
| 86 | + # - name: Build |
| 87 | + # run: ./.github/scripts/build-msys2.sh |
85 | 88 |
|
86 | | - - name: Build |
87 | | - run: ./.github/scripts/build.sh |
| 89 | + # macos: |
| 90 | + # name: "macOS build" |
| 91 | + # runs-on: macos-15 |
| 92 | + # env: |
| 93 | + # PREFIX: "/opt/homebrew" |
| 94 | + # PY3PATH: "/opt/homebrew/bin" |
| 95 | + # steps: |
| 96 | + # - name: Checkout |
| 97 | + # uses: actions/checkout@v4 |
88 | 98 |
|
89 | | - - name: Install dependencies for ngdevkit-examples |
90 | | - run: | |
91 | | - brew install ngdevkit-gngeo imagemagick sox glew make |
92 | | - $(brew --prefix python)/libexec/bin/pip install pyyaml --break-system-packages |
| 99 | + # - name: Dependencies |
| 100 | + # run: | |
| 101 | + # brew tap dciabrin/ngdevkit |
| 102 | + # brew install python3 --overwrite |
| 103 | + # brew install automake ngdevkit-toolchain zip pkg-config sdl2 sdl2_image |
| 104 | + # $(brew --prefix python)/libexec/bin/pip install pygame --break-system-packages |
| 105 | + |
| 106 | + # - name: Build |
| 107 | + # run: ./.github/scripts/build.sh |
| 108 | + |
| 109 | + # - name: Install dependencies for ngdevkit-examples |
| 110 | + # run: | |
| 111 | + # brew install ngdevkit-gngeo imagemagick sox glew make |
| 112 | + # $(brew --prefix python)/libexec/bin/pip install pyyaml --break-system-packages |
93 | 113 |
|
94 | | - - name: Test by compiling ngdevkit-examples |
95 | | - run: ./.github/scripts/test.sh |
| 114 | + # - name: Test by compiling ngdevkit-examples |
| 115 | + # run: ./.github/scripts/test.sh |
0 commit comments