From a016ea21fda1edc844f6437fc1601fec6a571ce7 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Fri, 18 Nov 2022 17:51:42 +0300 Subject: [PATCH 1/9] test-arm --- .github/workflows/snapshots.yml | 104 ++++++++++++++++++++------------ 1 file changed, 66 insertions(+), 38 deletions(-) diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index 0629238..f9e70b3 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -2,10 +2,10 @@ name: 'Automatic snapshots' on: push: - branches: - - master - paths: - - 'VERSION/**' +# branches: +# - master +# paths: +# - 'VERSION/**' jobs: build: @@ -13,11 +13,11 @@ jobs: matrix: include: - os: windows-latest - flag: win-x64 + flag: win - os: ubuntu-latest - flag: linux-x64 + flag: linux - os: macos-latest - flag: osx-x64 + flag: osx runs-on: ${{ matrix.os }} @@ -29,52 +29,80 @@ jobs: dotnet-version: '7.0.100' - run: | - dotnet publish -r ${{ matrix.flag }} -c release -o ./publish-output -p:Version=$(cat ./VERSION/VERSION) + dotnet publish -r ${{ matrix.flag }}-x64 -c release -o ./publish-output-x64 -p:Version=$(cat ./VERSION/VERSION) + dotnet publish -r ${{ matrix.flag }}-arm64 -c release -o ./publish-output-arm64 -p:Version=$(cat ./VERSION/VERSION) + mkdir publish-output - if: ${{ matrix.os != 'windows-latest' }} run: | - mv ./publish-output/CLI ./publish-output/amcli-${{ matrix.flag }} + mv ./publish-output-x64/CLI ./publish-output/amcli-${{ matrix.flag }}-x64 + mv ./publish-output-arm64/CLI ./publish-output/amcli-${{ matrix.flag }}-arm64 - if: ${{ matrix.os == 'windows-latest' }} run: | - mv ./publish-output/CLI.exe ./publish-output/amcli-win-x64.exe + mv ./publish-output-x64/CLI-x64.exe ./publish-output/amcli-win-x64.exe + mv ./publish-output-arm64/CLI-arm64.exe ./publish-output/amcli-win-x64.exe - uses: actions/upload-artifact@v3 if: ${{ matrix.os == 'windows-latest' }} with: name: amcli-win-x64 - path: ./publish-output/amcli-${{ matrix.flag }}.exe + path: ./publish-output/amcli-${{ matrix.flag }}-x64.exe - uses: actions/upload-artifact@v3 - if: ${{ matrix.os != 'windows-latest' }} + if: ${{ matrix.os == 'windows-latest' }} with: - name: amcli-${{ matrix.flag }} - path: ./publish-output/amcli-${{ matrix.flag }} + name: amcli-win-arm64 + path: ./publish-output/amcli-${{ matrix.flag }}-arm64.exe - release: - needs: build - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v3 - with: - name: amcli-win-x64 - - uses: actions/download-artifact@v3 + - uses: actions/upload-artifact@v3 + if: ${{ matrix.os != 'windows-latest' }} with: - name: amcli-linux-x64 - - uses: actions/download-artifact@v3 + name: amcli-${{ matrix.flag }}-x64 + path: ./publish-output/amcli-${{ matrix.flag }}-x64 + + - uses: actions/upload-artifact@v3 + if: ${{ matrix.os != 'windows-latest' }} with: - name: amcli-osx-x64 + name: amcli-${{ matrix.flag }}-arm64 + path: ./publish-output/amcli-${{ matrix.flag }}-arm64 - - run: | - version=$(cat ./VERSION/VERSION) - echo ${{ secrets.CLI_ACCESS_TOKEN }} > token.txt - gh auth login --with-token < token.txt - gh release create v$version \ - ./amcli-win-x64.exe \ - ./amcli-linux-x64 \ - ./amcli-osx-x64 \ - -R asc-community/AngouriMathCLI \ - -t 'AngouriMath CLI' \ - -n 'Expant assets and find the binary for you' +# release: +# needs: build +# runs-on: ubuntu-latest +# +# steps: +# - uses: actions/checkout@v2 +# - uses: actions/download-artifact@v3 +# with: +# name: amcli-win-x64 +# - uses: actions/download-artifact@v3 +# with: +# name: amcli-linux-x64 +# - uses: actions/download-artifact@v3 +# with: +# name: amcli-osx-x64 +# - uses: actions/download-artifact@v3 +# with: +# name: amcli-win-arm64 +# - uses: actions/download-artifact@v3 +# with: +# name: amcli-linux-arm64 +# - uses: actions/download-artifact@v3 +# with: +# name: amcli-osx-arm64 +# +# - run: | +# version=$(cat ./VERSION/VERSION) +# echo ${{ secrets.CLI_ACCESS_TOKEN }} > token.txt +# gh auth login --with-token < token.txt +# gh release create v$version \ +# ./amcli-win-x64.exe \ +# ./amcli-linux-x64 \ +# ./amcli-osx-x64 \ +# ./amcli-win-arm64.exe \ +# ./amcli-linux-arm64 \ +# ./amcli-osx-arm64 \ +# -R asc-community/AngouriMathCLI \ +# -t 'AngouriMath CLI' \ +# -n 'Expant assets and find the binary for you' From 88dfa9a042b9c18f3739f5a1d91c960ded68470b Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Fri, 18 Nov 2022 18:25:42 +0300 Subject: [PATCH 2/9] upd --- .github/workflows/snapshots.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index f9e70b3..fac9ab3 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -28,6 +28,10 @@ jobs: with: dotnet-version: '7.0.100' + - if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + apt install binutils-aarch64-linux-gnu -y + - run: | dotnet publish -r ${{ matrix.flag }}-x64 -c release -o ./publish-output-x64 -p:Version=$(cat ./VERSION/VERSION) dotnet publish -r ${{ matrix.flag }}-arm64 -c release -o ./publish-output-arm64 -p:Version=$(cat ./VERSION/VERSION) From fd017d77ea210e45d76369151798ba6fd17cadd1 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Fri, 18 Nov 2022 18:42:50 +0300 Subject: [PATCH 3/9] fix --- .github/workflows/snapshots.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index fac9ab3..f9f8adc 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -30,7 +30,7 @@ jobs: - if: ${{ matrix.os == 'ubuntu-latest' }} run: | - apt install binutils-aarch64-linux-gnu -y + sudo apt install binutils-aarch64-linux-gnu -y - run: | dotnet publish -r ${{ matrix.flag }}-x64 -c release -o ./publish-output-x64 -p:Version=$(cat ./VERSION/VERSION) From db6281a283aeb6e7ca7a8cb55b7e6bdb7f4fb237 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Fri, 18 Nov 2022 23:10:29 +0600 Subject: [PATCH 4/9] Update snapshots.yml --- .github/workflows/snapshots.yml | 87 +++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index f9f8adc..862fbe5 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -8,18 +8,26 @@ on: # - 'VERSION/**' jobs: - build: - strategy: - matrix: - include: - - os: windows-latest - flag: win - - os: ubuntu-latest - flag: linux - - os: macos-latest - flag: osx - - runs-on: ${{ matrix.os }} + build-osx: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: '7.0.100' + - run: | + dotnet publish -r osx-x64 -c release -o ./publish-output -p:Version=$(cat ./VERSION/VERSION) + mv ./publish-output/CLI ./publish-output/amcli-osx-x64 + + - uses: actions/upload-artifact@v3 + with: + name: amcli-osx-x64 + path: ./publish-output/amcli-osx-x64 + + build-linux: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -27,52 +35,55 @@ jobs: - uses: actions/setup-dotnet@v1 with: dotnet-version: '7.0.100' - - - if: ${{ matrix.os == 'ubuntu-latest' }} - run: | - sudo apt install binutils-aarch64-linux-gnu -y - run: | + sudo apt install binutils-aarch64-linux-gnu -y dotnet publish -r ${{ matrix.flag }}-x64 -c release -o ./publish-output-x64 -p:Version=$(cat ./VERSION/VERSION) dotnet publish -r ${{ matrix.flag }}-arm64 -c release -o ./publish-output-arm64 -p:Version=$(cat ./VERSION/VERSION) mkdir publish-output + mv ./publish-output-x64/CLI ./publish-output/amcli-linux-x64 + mv ./publish-output-arm64/CLI ./publish-output/amcli-linux-arm64 - - if: ${{ matrix.os != 'windows-latest' }} - run: | - mv ./publish-output-x64/CLI ./publish-output/amcli-${{ matrix.flag }}-x64 - mv ./publish-output-arm64/CLI ./publish-output/amcli-${{ matrix.flag }}-arm64 + - uses: actions/upload-artifact@v3 + with: + name: amcli-linux-x64 + path: ./publish-output/amcli-linux-x64 - - if: ${{ matrix.os == 'windows-latest' }} - run: | + - uses: actions/upload-artifact@v3 + with: + name: amcli-linux-arm64 + path: ./publish-output/amcli-linux-arm64 + + build-win: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: '7.0.100' + + - run: | + dotnet publish -r win-x64 -c release -o ./publish-output-x64 -p:Version=$(cat ./VERSION/VERSION) + dotnet publish -r win-arm64 -c release -o ./publish-output-arm64 -p:Version=$(cat ./VERSION/VERSION) + mkdir publish-output mv ./publish-output-x64/CLI-x64.exe ./publish-output/amcli-win-x64.exe mv ./publish-output-arm64/CLI-arm64.exe ./publish-output/amcli-win-x64.exe - uses: actions/upload-artifact@v3 - if: ${{ matrix.os == 'windows-latest' }} with: name: amcli-win-x64 - path: ./publish-output/amcli-${{ matrix.flag }}-x64.exe + path: ./publish-output/amcli-win-x64.exe - uses: actions/upload-artifact@v3 - if: ${{ matrix.os == 'windows-latest' }} with: name: amcli-win-arm64 - path: ./publish-output/amcli-${{ matrix.flag }}-arm64.exe - - - uses: actions/upload-artifact@v3 - if: ${{ matrix.os != 'windows-latest' }} - with: - name: amcli-${{ matrix.flag }}-x64 - path: ./publish-output/amcli-${{ matrix.flag }}-x64 + path: ./publish-output/amcli-win-arm64.exe - - uses: actions/upload-artifact@v3 - if: ${{ matrix.os != 'windows-latest' }} - with: - name: amcli-${{ matrix.flag }}-arm64 - path: ./publish-output/amcli-${{ matrix.flag }}-arm64 # release: -# needs: build +# needs: build-osx, build-win, build-linux # runs-on: ubuntu-latest # # steps: From 03923937046cce9e66f042a3c4f4f120100fd9f2 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Fri, 18 Nov 2022 23:16:14 +0600 Subject: [PATCH 5/9] Update snapshots.yml --- .github/workflows/snapshots.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index 862fbe5..7d64918 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -38,8 +38,8 @@ jobs: - run: | sudo apt install binutils-aarch64-linux-gnu -y - dotnet publish -r ${{ matrix.flag }}-x64 -c release -o ./publish-output-x64 -p:Version=$(cat ./VERSION/VERSION) - dotnet publish -r ${{ matrix.flag }}-arm64 -c release -o ./publish-output-arm64 -p:Version=$(cat ./VERSION/VERSION) + dotnet publish -r linux-x64 -c release -o ./publish-output-x64 -p:Version=$(cat ./VERSION/VERSION) + dotnet publish -r linux-arm64 -c release -o ./publish-output-arm64 -p:Version=$(cat ./VERSION/VERSION) mkdir publish-output mv ./publish-output-x64/CLI ./publish-output/amcli-linux-x64 mv ./publish-output-arm64/CLI ./publish-output/amcli-linux-arm64 @@ -68,8 +68,8 @@ jobs: dotnet publish -r win-x64 -c release -o ./publish-output-x64 -p:Version=$(cat ./VERSION/VERSION) dotnet publish -r win-arm64 -c release -o ./publish-output-arm64 -p:Version=$(cat ./VERSION/VERSION) mkdir publish-output - mv ./publish-output-x64/CLI-x64.exe ./publish-output/amcli-win-x64.exe - mv ./publish-output-arm64/CLI-arm64.exe ./publish-output/amcli-win-x64.exe + mv ./publish-output-x64/CLI.exe ./publish-output/amcli-win-x64.exe + mv ./publish-output-arm64/CLI.exe ./publish-output/amcli-win-arm64.exe - uses: actions/upload-artifact@v3 with: From 82defde04b12f7bd3deeb7042f001ec9f9da6f4f Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Fri, 18 Nov 2022 23:23:44 +0600 Subject: [PATCH 6/9] Update snapshots.yml --- .github/workflows/snapshots.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index 7d64918..7ed60b6 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -36,7 +36,14 @@ jobs: with: dotnet-version: '7.0.100' - - run: | + - name: 'Install packages' + run: | + dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json + dotnet add package Microsoft.DotNet.ILCompiler --prerelease + dotnet add package runtime.linux-x64.Microsoft.DotNet.ILCompiler --prerelease + + - name: 'Build' + run: | sudo apt install binutils-aarch64-linux-gnu -y dotnet publish -r linux-x64 -c release -o ./publish-output-x64 -p:Version=$(cat ./VERSION/VERSION) dotnet publish -r linux-arm64 -c release -o ./publish-output-arm64 -p:Version=$(cat ./VERSION/VERSION) From 7d2237dcf7fe35c61f8093ce55e6950172de6e91 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Fri, 18 Nov 2022 23:52:42 +0600 Subject: [PATCH 7/9] Update snapshots.yml --- .github/workflows/snapshots.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index 7ed60b6..d829344 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -38,9 +38,10 @@ jobs: - name: 'Install packages' run: | - dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json - dotnet add package Microsoft.DotNet.ILCompiler --prerelease - dotnet add package runtime.linux-x64.Microsoft.DotNet.ILCompiler --prerelease + sudo apt install gcc-multilib -y + # dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json + # dotnet add package Microsoft.DotNet.ILCompiler --prerelease + # dotnet add package runtime.linux-x64.Microsoft.DotNet.ILCompiler --prerelease - name: 'Build' run: | From c6e61813d2c011a45acd0d18e95b60df2a4f2300 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Fri, 18 Nov 2022 23:57:32 +0600 Subject: [PATCH 8/9] Update snapshots.yml --- .github/workflows/snapshots.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index d829344..85c03d2 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -39,6 +39,7 @@ jobs: - name: 'Install packages' run: | sudo apt install gcc-multilib -y + sudo apt install libc6-dev -y # dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json # dotnet add package Microsoft.DotNet.ILCompiler --prerelease # dotnet add package runtime.linux-x64.Microsoft.DotNet.ILCompiler --prerelease From 0513689663d96fdf8cd74ce8846f9795a1d158ca Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Sat, 19 Nov 2022 00:09:35 +0600 Subject: [PATCH 9/9] Update snapshots.yml --- .github/workflows/snapshots.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index 85c03d2..418355f 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -39,14 +39,14 @@ jobs: - name: 'Install packages' run: | sudo apt install gcc-multilib -y - sudo apt install libc6-dev -y + sudo apt install libc-dev -y + sudo apt install binutils-aarch64-linux-gnu -y # dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json # dotnet add package Microsoft.DotNet.ILCompiler --prerelease # dotnet add package runtime.linux-x64.Microsoft.DotNet.ILCompiler --prerelease - name: 'Build' run: | - sudo apt install binutils-aarch64-linux-gnu -y dotnet publish -r linux-x64 -c release -o ./publish-output-x64 -p:Version=$(cat ./VERSION/VERSION) dotnet publish -r linux-arm64 -c release -o ./publish-output-arm64 -p:Version=$(cat ./VERSION/VERSION) mkdir publish-output