diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 60b3047..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,51 +0,0 @@ -name: Continuous Integration - -on: - push: - pull_request: - -jobs: - linux-mono: - name: Linux (mono) - runs-on: ubuntu-20.04 - - steps: - - name: Clone Repository - uses: actions/checkout@v2 - - - name: Prepare Environment - run: | - . mod.config; - awk '/\r$$/ { exit(1); }' mod.config || (printf "Invalid mod.config format. File must be saved using unix-style (LF, not CRLF or CR) line endings.\n"; exit 1); - - - name: Check Code - run: | - make check - make check-packaging-scripts - - - name: Check Mod - run: | - sudo apt-get install lua5.1 - make check-scripts - make test - - windows: - name: Windows (Framework 4.7) - runs-on: windows-2019 - - steps: - - name: Clone Repository - uses: actions/checkout@v2 - - - name: Check Code - shell: powershell - run: | - dotnet nuget locals all --clear - .\make.ps1 check - - - name: Check Mods - run: | - chocolatey install lua --version 5.1.5.52 - $ENV:Path = $ENV:Path + ";C:\Program Files (x86)\Lua\5.1\" - .\make.ps1 check-scripts - .\make.ps1 test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c55fc01 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,86 @@ +name: Continuous Integration + +on: + push: + pull_request: + +jobs: + linux: + name: Linux (.NET 6.0) + runs-on: ubuntu-22.04 + + steps: + - name: Clone Repository + uses: actions/checkout@v3 + + - name: Install .NET 6.0 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + + - name: Prepare Environment + run: | + . mod.config; + awk '/\r$$/ { exit(1); }' mod.config || (printf "Invalid mod.config format. File must be saved using unix-style (LF, not CRLF or CR) line endings.\n"; exit 1); + + - name: Check Code + run: | + make check + make check-packaging-scripts + + - name: Check Mod + run: | + sudo apt-get install lua5.1 + make check-scripts + make test + + linux-mono: + name: Linux (mono) + runs-on: ubuntu-22.04 + + steps: + - name: Clone Repository + uses: actions/checkout@v3 + + - name: Prepare Environment + run: | + . mod.config; + awk '/\r$$/ { exit(1); }' mod.config || (printf "Invalid mod.config format. File must be saved using unix-style (LF, not CRLF or CR) line endings.\n"; exit 1); + + - name: Check Code + run: | + # check-packaging-scripts does not depend on .net/mono, so is not needed here + mono --version + make RUNTIME=mono check + + - name: Check Mod + run: | + # check-scripts does not depend on .net/mono, so is not needed here + make RUNTIME=mono test + + windows: + name: Windows (.NET 6.0) + runs-on: windows-2019 + + steps: + - name: Clone Repository + uses: actions/checkout@v3 + + - name: Install .NET 6.0 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + + - name: Check Code + shell: powershell + run: | + # Work around runtime failures on the GH Actions runner + dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org + .\make.ps1 check + + - name: Check Mods + run: | + chocolatey install lua --version 5.1.5.52 + $ENV:Path = $ENV:Path + ";C:\Program Files (x86)\Lua\5.1\" + .\make.ps1 check-scripts + .\make.ps1 test diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index dd82905..7b4711c 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -8,11 +8,15 @@ on: jobs: linux: name: Linux AppImages - runs-on: ubuntu-20.04 - + runs-on: ubuntu-22.04 steps: - name: Clone Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Install .NET 6.0 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' - name: Prepare Environment run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> ${GITHUB_ENV} @@ -21,6 +25,7 @@ jobs: run: | make engine mkdir -p build/linux + sudo apt install libfuse2 ./packaging/linux/buildpackage.sh "${GIT_TAG}" "${PWD}/build/linux" - name: Upload Packages @@ -33,17 +38,21 @@ jobs: file: build/linux/* macos: - name: macOS Disk Images - runs-on: macos-10.15 - + name: macOS Disk Image + runs-on: macos-11 steps: - name: Clone Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Install .NET 6.0 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' - name: Prepare Environment run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> ${GITHUB_ENV} - - name: Package Disk Images + - name: Package Disk Image env: MACOS_DEVELOPER_IDENTITY: ${{ secrets.MACOS_DEVELOPER_IDENTITY }} MACOS_DEVELOPER_CERTIFICATE_BASE64: ${{ secrets.MACOS_DEVELOPER_CERTIFICATE_BASE64 }} @@ -55,7 +64,7 @@ jobs: mkdir -p build/macos ./packaging/macos/buildpackage.sh "${GIT_TAG}" "${PWD}/build/macos" - - name: Upload Packages + - name: Upload Package uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -66,17 +75,21 @@ jobs: windows: name: Windows Installers - runs-on: ubuntu-20.04 - + runs-on: ubuntu-22.04 steps: - name: Clone Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Install .NET 6.0 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' - name: Prepare Environment run: | echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> ${GITHUB_ENV} sudo apt-get update - sudo apt-get install nsis + sudo apt-get install nsis wine64 - name: Package Installers run: |