2021-07-03 16:02:08 +02:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
2021-12-04 09:02:57 +01:00
|
|
|
tests:
|
2021-07-03 23:15:51 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-12-03 07:35:17 +01:00
|
|
|
os: [ ubuntu-18.04, ubuntu-20.04 ]
|
2021-07-03 23:15:51 +02:00
|
|
|
runs-on: ${{ matrix.os }}
|
2021-07-03 16:02:08 +02:00
|
|
|
|
|
|
|
steps:
|
2021-12-03 07:35:17 +01:00
|
|
|
- uses: actions/checkout@v2
|
2021-12-04 09:02:57 +01:00
|
|
|
- name: Add key
|
|
|
|
run: wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
|
|
|
- name: Add repo
|
|
|
|
env:
|
|
|
|
UBUNTU: ${{ matrix.os }}
|
|
|
|
run: echo $UBUNTU &&\
|
|
|
|
[[ "${UBUNTU}" == "ubuntu-18.04" ]]&&\
|
|
|
|
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null || echo 1;
|
|
|
|
- name: Install binary compressor
|
|
|
|
run: sudo apt-get update && sudo apt-get install upx-ucl xcb libxcb-shape0 libxcb-xfixes0 libxcb-record0 libxcb-shape0-dev libxcb-xfixes0-dev libxcb-record0-dev cmake
|
2022-09-15 08:51:03 +02:00
|
|
|
- name: Add nightly
|
|
|
|
run: rustup default nightly
|
2022-09-15 09:12:04 +02:00
|
|
|
- name: Add targets
|
|
|
|
run: rustup target install x86_64-unknown-linux-musl && rustup target install x86_64-unknown-linux-gnu
|
2021-12-03 07:35:17 +01:00
|
|
|
- name: Run fmt check
|
|
|
|
run: cargo fmt -- --check
|
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --verbose
|
2021-12-04 09:02:57 +01:00
|
|
|
clippy:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ ubuntu-18.04, ubuntu-20.04 ]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Add key
|
|
|
|
run: wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
|
|
|
- name: Add repo
|
|
|
|
env:
|
|
|
|
UBUNTU: ${{ matrix.os }}
|
|
|
|
run: echo $UBUNTU &&\
|
|
|
|
[[ "${UBUNTU}" == "ubuntu-18.04" ]]&&\
|
|
|
|
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null || echo 1;
|
|
|
|
- name: Install binary compressor
|
|
|
|
run: sudo apt-get update && sudo apt-get install upx-ucl xcb libxcb-shape0 libxcb-xfixes0 libxcb-record0 libxcb-shape0-dev libxcb-xfixes0-dev libxcb-record0-dev cmake
|
|
|
|
- name: Add target
|
|
|
|
run: rustup target install x86_64-unknown-linux-musl
|
|
|
|
- name: Run clippy
|
|
|
|
run: cargo clippy -- -D warnings
|
|
|
|
|
|
|
|
build:
|
2022-01-28 10:19:29 +01:00
|
|
|
needs: [clippy, tests]
|
2021-12-04 09:02:57 +01:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ ubuntu-18.04, ubuntu-20.04 ]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Add key
|
|
|
|
run: wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
|
|
|
- name: Add repo
|
|
|
|
env:
|
|
|
|
UBUNTU: ${{ matrix.os }}
|
|
|
|
run: echo $UBUNTU &&\
|
|
|
|
[[ "${UBUNTU}" == "ubuntu-18.04" ]]&&\
|
|
|
|
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null || echo 1;
|
2021-12-03 07:35:17 +01:00
|
|
|
- name: Install binary compressor
|
2021-12-04 09:02:57 +01:00
|
|
|
run: sudo apt-get update && sudo apt-get install upx-ucl xcb libxcb-shape0 libxcb-xfixes0 libxcb-record0 libxcb-shape0-dev libxcb-xfixes0-dev libxcb-record0-dev cmake zip
|
|
|
|
- name: Add target
|
|
|
|
run: rustup target install x86_64-unknown-linux-musl
|
|
|
|
- name: Compile
|
|
|
|
run: bash ./scripts/compile.sh
|
|
|
|
- name: Optimize
|
|
|
|
run: bash ./scripts/build.sh
|
|
|
|
- name: Collect artifacts
|
|
|
|
env:
|
|
|
|
OS: ${{ matrix.os }}
|
|
|
|
run: ./scripts/zip-ci.sh $OS
|
|
|
|
|
2022-06-15 17:55:34 +02:00
|
|
|
- name: Upload archive with all
|
2021-12-03 07:35:17 +01:00
|
|
|
uses: actions/upload-artifact@v2.2.4
|
|
|
|
with:
|
2022-06-15 17:55:34 +02:00
|
|
|
name: ${{ matrix.os }}.tar.gz
|
|
|
|
path: ./tmp/${{ matrix.os }}.tar.gz
|
|
|
|
- name: Upload amdfand
|
|
|
|
uses: actions/upload-artifact@v2.2.4
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.os }}-amdfand.tar.gz
|
|
|
|
path: ./tmp/amdfand.tar.gz
|
|
|
|
- name: Upload amdguid-glium
|
|
|
|
uses: actions/upload-artifact@v2.2.4
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.os }}-amdguid-glium.tar.gz
|
|
|
|
path: ./tmp/amdguid-glium.tar.gz
|
|
|
|
- name: Upload amdguid-glow
|
|
|
|
uses: actions/upload-artifact@v2.2.4
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.os }}-amdguid-glow.tar.gz
|
|
|
|
path: ./tmp/amdguid-glow.tar.gz
|
|
|
|
- name: Upload amdguid-wayland
|
|
|
|
uses: actions/upload-artifact@v2.2.4
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.os }}-amdguid-wayland.tar.gz
|
|
|
|
path: ./tmp/amdguid-wayland.tar.gz
|
|
|
|
- name: Upload amdmond
|
|
|
|
uses: actions/upload-artifact@v2.2.4
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.os }}-amdmond.tar.gz
|
|
|
|
path: ./tmp/amdmond.tar.gz
|
|
|
|
- name: Upload amdvold
|
|
|
|
uses: actions/upload-artifact@v2.2.4
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.os }}-amdvold.tar.gz
|
|
|
|
path: ./tmp/amdvold.tar.gz
|
|
|
|
|