name: Rust on: push: branches: [ main ] pull_request: branches: [ main ] env: CARGO_TERM_COLOR: always jobs: tests: 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 fmt check run: cargo fmt -- --check - name: Run tests run: cargo test --verbose 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: needs: [clippy, tests] 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 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 - name: Upload archive with all uses: actions/upload-artifact@v2.2.4 with: 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