From 6c1dc046deaec3fe1ada08500997c325a559615d Mon Sep 17 00:00:00 2001 From: Lily Lyons Date: Tue, 21 Nov 2023 00:34:50 -0800 Subject: [PATCH] Don't run CI on certain changes Also move the trunk build to build.yml --- .github/workflows/build-steam.yml | 4 ++++ .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++-- .github/workflows/checks.yml | 31 +++++++-------------------- 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-steam.yml b/.github/workflows/build-steam.yml index db1618a1..0415265d 100644 --- a/.github/workflows/build-steam.yml +++ b/.github/workflows/build-steam.yml @@ -1,6 +1,10 @@ on: push: branches: dev + paths-ignore: + - '.github/**' + - '.vscode/**' + - '**.md' workflow_dispatch: name: Autobuild Steam diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be063897..10b55367 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,9 @@ on: push: + paths-ignore: + - '.github/**' + - '.vscode/**' + - '**.md' workflow_dispatch: name: Autobuild @@ -74,9 +78,36 @@ jobs: - name: Setup artifact run: | mkdir -p ${{ github.workspace }}/artifact - cp ${{ github.workspace }}/target/release/luminol ${{ github.workspace }}/artifact\ + cp ${{ github.workspace }}/target/release/luminol ${{ github.workspace }}/artifact - name: Upload artifact uses: actions/upload-artifact@v2 with: name: luminol-mac - path: ${{ github.workspace }}/artifact/ \ No newline at end of file + path: ${{ github.workspace }}/artifact/ + + build-trunk: + name: Build Trunk + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install libraries + run: | + sudo apt update + sudo apt install libgtk-3-dev libatk1.0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev libasound2-dev clang mold -y + - uses: dtolnay/rust-toolchain@nightly + with: + toolchain: nightly-2023-09-12 + targets: wasm32-unknown-unknown + components: rust-src + - name: Download and install Trunk binary + run: wget -qO- https://github.com/thedodd/trunk/releases/download/v0.17.5/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + - run: ./trunk build --release + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: luminol-trunk + path: ${{ github.workspace }}/dist/ \ No newline at end of file diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 03593de7..cf5c8da8 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,4 +1,11 @@ -on: [push, pull_request] +on: + push: + paths-ignore: + - '.github/**' + - '.vscode/**' + - '**.md' + pull_request: + workflow_dispatch: name: CI @@ -58,28 +65,6 @@ jobs: uses: Swatinem/rust-cache@v2 - run: cargo test --lib --jobs 1 - trunk: - name: Trunk - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Install libraries - run: | - sudo apt update - sudo apt install libgtk-3-dev libatk1.0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev libasound2-dev clang mold -y - - uses: dtolnay/rust-toolchain@nightly - with: - toolchain: nightly-2023-09-12 - targets: wasm32-unknown-unknown - components: rust-src - - name: Download and install Trunk binary - run: wget -qO- https://github.com/thedodd/trunk/releases/download/v0.17.5/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- - - name: Rust Cache - uses: Swatinem/rust-cache@v2 - - run: ./trunk build - fmt: name: Rustfmt runs-on: ubuntu-latest