From 31be84645b8c72d406da28e68fab8b1101d20867 Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Mon, 30 Dec 2024 04:28:09 -0300 Subject: [PATCH] extended deploy cannon to main branch --- .github/workflows/pack_early.yaml | 5 +--- .github/workflows/publish.yaml | 48 ++++++++++++++++++++----------- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pack_early.yaml b/.github/workflows/pack_early.yaml index 265a68f..1cdd758 100644 --- a/.github/workflows/pack_early.yaml +++ b/.github/workflows/pack_early.yaml @@ -1,11 +1,8 @@ name: Pack_beta on: - push: - branches: - - action pull_request: - branches: [action] + branches: [main] jobs: build_extension: diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e4ad6b0..6de3c22 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -8,45 +8,61 @@ jobs: build_extension: strategy: matrix: - arrays: [ - os: { tag: "windows-latest", target: "i686-pc-windows-msvc" }, - os: { tag: "windows-latest", target: "x86_64-pc-windows-msvc" }, - ] - runs-on: ${{ matrix.arrays.os.tag }} + os_target: + - { os: "windows-latest", target: "i686-pc-windows-msvc", artifact: "armatak.dll", name: "armatak.dll" } + - { os: "windows-latest", target: "x86_64-pc-windows-msvc", artifact: "armatak.dll", name: "armatak_x64.dll" } + - { os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu", artifact: "libarmatak.so", name: "armatak.so" } + runs-on: ${{ matrix.os_target.os }} steps: - name: Checkout Repo uses: actions/checkout@v4 with: lfs: true - - name: Install latest + - name: Install Rust Toolchain uses: actions-rs/toolchain@v1 with: - target: ${{ matrix.arrays.os.target }} + target: ${{ matrix.os_target.target }} toolchain: stable default: true + - name: Install Dependencies (Linux only) + if: matrix.os_target.os == 'ubuntu-latest' + run: sudo apt-get update && sudo apt-get install -y build-essential - name: Cargo Build - run: cargo build --release - - name: Upload + run: cargo build --release --target ${{ matrix.os_target.target }} + - name: check stuff + run: ls target/release + - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: ${{ matrix.arrays.os.target }} - path: target/release/armatak.dll + name: ${{ matrix.os_target.target }} + path: target/${{ matrix.os_target.target }}/release/${{ matrix.os_target.artifact }} if-no-files-found: error - retention-days: 30 + retention-days: 7 + package: needs: build_extension runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: + - name: Checkout Repo + uses: actions/checkout@v4 + with: lfs: true - - uses: actions/download-artifact@v4 + - run: mkdir -p ./target/release + - name: Download Windows x64 Artifact + uses: actions/download-artifact@v4 with: name: x86_64-pc-windows-msvc + - run: ls - run: mv ./armatak.dll ./armatak_x64.dll - - uses: actions/download-artifact@v4 + - name: Download Windows x86 Artifact + uses: actions/download-artifact@v4 with: name: i686-pc-windows-msvc + - name: Download Linux x64 Artifact + uses: actions/download-artifact@v4 + with: + name: x86_64-unknown-linux-gnu + - run: mv ./libarmatak.so ./armatak.so - name: Setup HEMTT uses: arma-actions/hemtt@v1 - name: Build