Skip to content

Commit

Permalink
Update Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TitanNano committed Jun 24, 2024
1 parent f6529c0 commit 86438e9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
arch: ['x86_64', 'aarch64']
include:
- platform: linux
os: ubuntu-20.04
os: ubuntu-22.04
vendor: unknown
env: -gnu
lib: libnative.so
Expand All @@ -26,7 +26,7 @@ jobs:
env: '-msvc'
lib: native.dll
- platform: darwin
os: macos-11
os: macos-14
vendor: apple
lib: libnative.dylib
exclude:
Expand All @@ -42,18 +42,19 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up clang64
if: contains(matrix.os, 'windows')
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- name: Add Build target
run: |
cd native/
rustup target add ${{ env.TARGET_TRIPLET }}
- uses: Swatinem/rust-cache@v2
with:
workspaces: ./native/
key: ${{ matrix.arch }}
cache-directories: "${{ env.HOME }}/.rustup/"
- name: Add Build target
run: |
cd native/
rustup target add ${{ env.TARGET_TRIPLET }}
- name: Build Debug
if: ${{ !inputs.release }}
run: |
Expand All @@ -65,7 +66,7 @@ jobs:
cd native/
${{ env.CARGO_BUILD }} ${{ env.TARGET_TRIPLET}} --release
- name: Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: libnative-${{ matrix.platform }}-${{ matrix.arch }}
path: native/target/${{ env.TARGET_TRIPLET }}/${{ inputs.release && 'release' || 'debug' }}/${{ matrix.lib }}
Expand All @@ -79,7 +80,7 @@ jobs:
- profile: 'macOS'
platform: darwin
vendor: apple
os: macos-12
os: macos-14
x86_64: true
aarch64: true
extension: '.dmg'
Expand All @@ -89,7 +90,7 @@ jobs:
platform: windows
env: '-msvc'
vendor: pc
os: ubuntu-20.04
os: ubuntu-22.04
x86_64: true
aarch64: true
extension: '.exe'
Expand All @@ -113,7 +114,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup Godot
uses: lihop/setup-godot@4aad9daa7dd81c11329c4b54fdc26dbd39eea7d6
with:
Expand All @@ -127,19 +128,19 @@ jobs:
unzip -j Godot_v${{ matrix.version }}-stable_export_templates.tpz
- name: download host libs
if: ${{ matrix.platform != 'linux' && startsWith(matrix.os, 'ubuntu') }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: libnative-linux-x86_64
path: native/target/x86_64-unknown-linux-gnu/debug/
- name: download x86_64 libs
if: matrix.x86_64
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: libnative-${{ matrix.platform }}-x86_64
path: native/target/x86_64-${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}/debug/
- name: download aarch64 libs
if: matrix.aarch64
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: libnative-${{ matrix.platform }}-aarch64
path: native/target/aarch64-${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}/debug/
Expand Down Expand Up @@ -192,7 +193,7 @@ jobs:
- name: describe revision
id: describe
run: echo "ref=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: SimChopper_${{ matrix.profile }}_${{ steps.describe.outputs.ref }}
path: ${{ env.EXPORT_DIR }}
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ jobs:
uses: ./.github/workflows/build.yml

rust-clippy:
runs-on: 'ubuntu-20.04'
runs-on: 'ubuntu-22.04'

steps:
- name: checkout
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v1
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
working-directory: ./native/
workspaces: ./native/
cache-directories: "${{ env.HOME }}/.rustup/"
- name: Check
run: |
cd native/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:

create-release:
needs: build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: download all artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts/
- name: list artifacts
Expand Down

0 comments on commit 86438e9

Please sign in to comment.