From 508ae5bc17466c97f60917ade27a0cfc4f4c116a Mon Sep 17 00:00:00 2001 From: Logan McNaughton <848146+loganmc10@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:08:47 +0100 Subject: [PATCH] build updates (#105) * build updates * more * more * more * more --- .github/workflows/build.yml | 27 ++++++++++++++++++++------- .github/workflows/lint.yml | 5 +---- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99b42d2b..6510f9dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,8 @@ env: jobs: build-linux: runs-on: ubuntu-latest + env: + TARGET: x86_64-unknown-linux-gnu steps: - uses: actions/checkout@v4 with: @@ -20,33 +22,41 @@ jobs: run: | sudo apt -y install libsdl2-dev - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + rustflags: "" - name: Build run: | - cargo build --release -v + cargo build --release -v --target=${{ env.TARGET }} - name: Upload file uses: actions/upload-artifact@v4 with: name: gopher64-linux - path: target/release/gopher64 + path: target/${{ env.TARGET }}/release/gopher64 build-windows: runs-on: windows-latest + env: + TARGET: x86_64-pc-windows-msvc steps: - uses: actions/checkout@v4 with: submodules: recursive - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + rustflags: "" - name: Build run: | - cargo build --release -v + cargo build --release -v --target=${{ env.TARGET }} - name: Upload file uses: actions/upload-artifact@v4 with: name: gopher64-windows - path: target/release/gopher64.exe + path: target/${{ env.TARGET }}/release/gopher64.exe build-macos: - runs-on: macos-13 + runs-on: macos-latest + env: + TARGET: x86_64-apple-darwin steps: - uses: actions/checkout@v4 with: @@ -55,11 +65,14 @@ jobs: run: | brew install sdl2 - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + target: ${{ env.TARGET }} + rustflags: "" - name: Build run: | - cargo build --release -v + cargo build --release -v --target=${{ env.TARGET }} - name: Upload file uses: actions/upload-artifact@v4 with: name: gopher64-mac - path: target/release/gopher64 + path: target/${{ env.TARGET }}/release/gopher64 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 329543f1..0ffe90d1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,12 +16,9 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - name: Install sdl2 headers - run: | - sudo apt -y install libsdl2-dev - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - components: clippy + components: clippy, rustfmt - name: Rustfmt Check uses: actions-rust-lang/rustfmt@v1 - name: Lint