|
8 | 8 | pull_request: |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - build-docker: |
| 11 | + build: |
| 12 | + runs-on: ${{ matrix.os }} |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + os: |
| 16 | + - ubuntu-latest |
| 17 | + - macos-latest |
| 18 | + - windows-latest |
| 19 | + steps: |
| 20 | + - name: Clone Repository |
| 21 | + uses: actions/checkout@v2 |
| 22 | + with: |
| 23 | + submodules: recursive |
| 24 | + |
| 25 | + - name: Install DBus |
| 26 | + if: contains(matrix.os, 'ubuntu') |
| 27 | + run: | |
| 28 | + sudo apt-get update |
| 29 | + sudo apt-get install -y libdbus-1-dev |
| 30 | +
|
| 31 | + - name: Setup CMake |
| 32 | + if: contains(matrix.os, 'macos') |
| 33 | + uses: jwlawson/actions-setup-cmake@v1.12 |
| 34 | + with: |
| 35 | + cmake-version: '3.21.x' |
| 36 | + |
| 37 | + - name: Add msbuild to PATH |
| 38 | + if: contains(matrix.os, 'windows') |
| 39 | + uses: microsoft/setup-msbuild@v1.0.2 |
| 40 | + |
| 41 | + - name: Setup Node.js |
| 42 | + uses: actions/setup-node@v3 |
| 43 | + with: |
| 44 | + node-version: 16 |
| 45 | + cache: "npm" |
| 46 | + |
| 47 | + - name: Setup Deno |
| 48 | + uses: denoland/setup-deno@main |
| 49 | + with: |
| 50 | + deno-version: 'v1.x' |
| 51 | + |
| 52 | + - name: Install dependencies |
| 53 | + run: npm ci --ignore-scripts |
| 54 | + |
| 55 | + - name: Build |
| 56 | + run: npm run pre-build |
| 57 | + |
| 58 | + - name: Upload artifacts |
| 59 | + uses: actions/upload-artifact@v3 |
| 60 | + with: |
| 61 | + name: builds |
| 62 | + path: | |
| 63 | + build/Release/*.dll |
| 64 | + build/Release/*.dylib |
| 65 | + build/Release/*.so |
| 66 | + prebuilds/* |
| 67 | + retention-days: 1 |
| 68 | + |
| 69 | + build-cross: |
12 | 70 | runs-on: ubuntu-latest |
13 | | - env: |
14 | | - DBus1_ROOT: ${{ github.workspace }}/cmake |
15 | 71 | strategy: |
16 | 72 | matrix: |
17 | | - build: |
18 | | - - image: ghcr.io/prebuild/linux-arm64:2 |
19 | | - arch: aarch64-linux-gnu |
20 | | - container: |
21 | | - image: ${{ matrix.build.image }} |
22 | | - options: --user root |
23 | | - env: |
24 | | - DBus1_ROOT: ${{ github.workspace }}/cmake |
| 73 | + arch: |
| 74 | + - arm64 |
25 | 75 | steps: |
26 | | - - name: Checkout repository |
27 | | - uses: actions/checkout@v3 |
28 | | - with: |
29 | | - submodules: recursive |
30 | | - |
31 | | - - name: Set ownership |
32 | | - run: | |
33 | | - # Workaround for https://github.com/actions/runner/issues/2033 |
34 | | - chown -R $(id -u):$(id -g) $PWD |
35 | | -
|
36 | | - - name: Install DBus |
37 | | - run: | |
38 | | - echo "deb http://deb.debian.org/debian unstable main" | tee -a /etc/apt/sources.list |
39 | | - printf "Package: *\nPin: release a=bullseye\nPin-Priority: 700\n\nPackage: *\nPin: release a=unstable\nPin-Priority: 600\n" | tee -a /etc/apt/preferences |
40 | | - apt-get update |
41 | | - apt-get -t unstable install -y libdbus-1-3 libdbus-1-dev ninja-build |
42 | | -
|
43 | | - - name: Install Node.js |
44 | | - uses: actions/setup-node@v3 |
45 | | - with: |
46 | | - node-version: '16.x' |
47 | | - cache: "npm" |
48 | | - |
49 | | - - name: Install CMake |
50 | | - uses: jwlawson/actions-setup-cmake@v1.13 |
51 | | - with: |
52 | | - cmake-version: '3.21.x' |
53 | | - |
54 | | - - name: Install dependencies |
55 | | - run: npm ci --ignore-scripts |
56 | | - |
57 | | - - name: Build |
58 | | - run: npm run pre-build |
59 | | - |
60 | | - - name: My test |
61 | | - run: find . -type f |
| 76 | + - name: Clone Repository |
| 77 | + uses: actions/checkout@v2 |
| 78 | + with: |
| 79 | + submodules: recursive |
| 80 | + |
| 81 | + - name: Install DBus |
| 82 | + run: | |
| 83 | + sudo apt-get update |
| 84 | + sudo apt-get install -y libdbus-1-dev |
| 85 | +
|
| 86 | + - name: Install ziglang |
| 87 | + uses: goto-bus-stop/setup-zig@v1 |
| 88 | + with: |
| 89 | + version: 0.10.0 |
| 90 | + |
| 91 | + - name: Setup Node.js |
| 92 | + uses: actions/setup-node@v3 |
| 93 | + with: |
| 94 | + node-version: 16 |
| 95 | + cache: "npm" |
| 96 | + |
| 97 | + - name: Setup Deno |
| 98 | + uses: denoland/setup-deno@main |
| 99 | + with: |
| 100 | + deno-version: 'v1.x' |
| 101 | + |
| 102 | + - name: Install Deps |
| 103 | + run: bash ./extract.sh ${{ matrix.arch }} |
| 104 | + |
| 105 | + - name: Install dependencies |
| 106 | + run: npm ci --ignore-scripts |
| 107 | + |
| 108 | + - name: Build |
| 109 | + run: npm run pre-build-${{ matrix.arch }} |
| 110 | + |
| 111 | + - name: Upload artifacts |
| 112 | + uses: actions/upload-artifact@v3 |
| 113 | + with: |
| 114 | + name: builds |
| 115 | + path: | |
| 116 | + build/Release/*.so |
| 117 | + prebuilds/* |
| 118 | + retention-days: 1 |
| 119 | + |
| 120 | + test-deploy: |
| 121 | + name: Test Deploy |
| 122 | + permissions: |
| 123 | + contents: write |
| 124 | + packages: write |
| 125 | + needs: [ build, build-cross, build-docker ] |
| 126 | + runs-on: ubuntu-latest |
| 127 | + steps: |
| 128 | + - name: Clone Repository |
| 129 | + uses: actions/checkout@v2 |
| 130 | + |
| 131 | + - name: Download artifacts |
| 132 | + uses: actions/download-artifact@v2 |
| 133 | + |
| 134 | + - name: My test |
| 135 | + run: find . -type f |
0 commit comments