summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: ded4bfb31a9bdab09236298f227e4bb8c8c104ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Build
on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        rust-version: [stable, nightly, 1.88.0]
    steps:
    - uses: hecrj/setup-rust-action@v2
      with:
        rust-version: ${{ matrix.rust-version }}
    - uses: actions/checkout@master
    - name: Install dependencies
      run: |
        export DEBIAN_FRONTED=noninteractive
        sudo apt-get -qq update
        sudo apt-get install -y libxkbcommon-dev clang mold
    - uses: actions/cache@v4
      with:
        path: |
          ~/.cargo/bin/
          ~/.cargo/registry/index/
          ~/.cargo/registry/cache/
          ~/.cargo/git/db/
          target/
        key: ${{ runner.os }}-build-${{ matrix.rust-version }}-${{ hashFiles('**/Cargo.lock') }}
    - name: Build iced-builder binary
      run: cargo build --verbose --profile release-opt
    - name: Archive iced-builder binary
      if: matrix.rust-version == 'stable'
      uses: actions/upload-artifact@v4
      with:
        name: iced-builder-x86_64-unknown-linux-gnu
        path: target/release-opt/iced-builder