From 9596dfd97fd78ec3c75d3191ac2e22dc87f90b81 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 29 Dec 2019 14:03:09 -0800 Subject: [PATCH] Add CI for Fedora --- .github/workflows/fedora.yml | 73 ++++++++++++++++++++++++++++++++++++ get-deps | 3 +- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/fedora.yml diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml new file mode 100644 index 000000000..777c5377f --- /dev/null +++ b/.github/workflows/fedora.yml @@ -0,0 +1,73 @@ +name: fedora + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + strategy: + fail-fast: false + matrix: + container: ["fedora:31"] + rust_toolchain: [stable] + runs-on: ubuntu-latest + container: ${{ matrix.container }} + steps: + - name: Install Git + shell: bash + run: | + sudo yum install -y git + - uses: actions/checkout@v1 + - name: Install System Deps + run: sudo ./get-deps + - name: Install Rust + run: | + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${{ matrix.rust_toolchain }} + source $HOME/.cargo/env + rustup update ${{ matrix.rust_toolchain }} + - name: Show versions + run: | + source $HOME/.cargo/env + rustc -V + cargo -V + - name: Cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: ${{ matrix.container }}-${{ matrix.rust_toolchain }}-cargo-registry-${{ hashFiles('Cargo.lock') }} + - name: Cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: ${{ matrix.container }}-${{ matrix.rust_toolchain }}-cargo-index-${{ hashFiles('Cargo.lock') }} + - name: Cache cargo build + uses: actions/cache@v1 + with: + path: target + key: ${{ matrix.container }}-${{ matrix.rust_toolchain }}-cargo-build-target-${{ hashFiles('Cargo.lock') }} + - name: Build + run: | + source $HOME/.cargo/env + cargo build --all --release + - name: Test + run: | + source $HOME/.cargo/env + cargo test --all --release + - name: Package + run: | + source $HOME/.cargo/env + bash ci/deploy.sh + - name: Move Linux Package + run: | + mkdir pkg_ + mv ~/rpmbuild/RPMS/*/*.rpm pkg_ + - uses: actions/upload-artifact@master + with: + name: linux + path: pkg_ + diff --git a/get-deps b/get-deps index 0a92033a5..fe93ed1f8 100755 --- a/get-deps +++ b/get-deps @@ -15,7 +15,8 @@ if test -e /etc/centos-release || test -e /etc/fedora-release; then mesa-libEGL-devel \ xcb-util-keysyms-devel \ xcb-util-wm-devel \ - rpm-build + rpm-build \ + redhat-lsb-core exit $? fi