linux generator

This commit is contained in:
Bryan Gerlach
2024-09-28 12:43:51 -05:00
parent 22c65bad53
commit c7141a16a1
2 changed files with 52 additions and 52 deletions

View File

@@ -107,14 +107,14 @@ jobs:
deb_arch: amd64, deb_arch: amd64,
vcpkg-triplet: x64-linux, vcpkg-triplet: x64-linux,
} }
- { # - {
arch: aarch64, # arch: aarch64,
target: aarch64-unknown-linux-gnu, # target: aarch64-unknown-linux-gnu,
distro: ubuntu18.04, # distro: ubuntu18.04,
on: [self-hosted, Linux, ARM64], # on: [self-hosted, Linux, ARM64],
deb_arch: arm64, # deb_arch: arm64,
vcpkg-triplet: arm64-linux, # vcpkg-triplet: arm64-linux,
} # }
steps: steps:
- name: Export GitHub Actions cache environment variables - name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6 uses: actions/github-script@v6
@@ -123,14 +123,14 @@ jobs:
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Maximize build space # - name: Maximize build space
if: ${{ matrix.job.arch == 'x86_64' }} # if: ${{ matrix.job.arch == 'x86_64' }}
run: | # run: |
# sudo rm -rf /opt/ghc # # sudo rm -rf /opt/ghc
# sudo rm -rf /usr/local/lib/android # # sudo rm -rf /usr/local/lib/android
# sudo rm -rf /usr/share/dotnet # # sudo rm -rf /usr/share/dotnet
sudo apt-get update -y # sudo apt-get update -y
sudo apt-get install -y nasm qemu-user-static # sudo apt-get install -y nasm qemu-user-static
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -148,18 +148,18 @@ jobs:
# df -h # df -h
# free -m # free -m
- name: Install Rust toolchain # - name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1 # uses: dtolnay/rust-toolchain@v1
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' # if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
with: # with:
toolchain: ${{ env.RUST_VERSION }} # toolchain: ${{ env.RUST_VERSION }}
targets: ${{ matrix.job.target }} # targets: ${{ matrix.job.target }}
components: "rustfmt" # components: "rustfmt"
- name: Save Rust toolchain version # - name: Save Rust toolchain version
run: | # run: |
RUST_TOOLCHAIN_VERSION=$(cargo --version | awk '{print $2}') # RUST_TOOLCHAIN_VERSION=$(cargo --version | awk '{print $2}')
echo "RUST_TOOLCHAIN_VERSION=$RUST_TOOLCHAIN_VERSION" >> $GITHUB_ENV # echo "RUST_TOOLCHAIN_VERSION=$RUST_TOOLCHAIN_VERSION" >> $GITHUB_ENV
- name: Disable rust bridge build - name: Disable rust bridge build
run: | run: |
@@ -173,31 +173,31 @@ jobs:
name: bridge-artifact name: bridge-artifact
path: ./ path: ./
- name: Setup vcpkg with Github Actions binary cache # - name: Setup vcpkg with Github Actions binary cache
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' # if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
uses: lukka/run-vcpkg@v11 # uses: lukka/run-vcpkg@v11
with: # with:
vcpkgDirectory: /opt/artifacts/vcpkg # vcpkgDirectory: /opt/artifacts/vcpkg
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} # vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
doNotCache: false # doNotCache: false
- name: Install vcpkg dependencies # - name: Install vcpkg dependencies
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' # if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
run: | # run: |
if ! $VCPKG_ROOT/vcpkg \ # if ! $VCPKG_ROOT/vcpkg \
install \ # install \
--triplet ${{ matrix.job.vcpkg-triplet }} \ # --triplet ${{ matrix.job.vcpkg-triplet }} \
--x-install-root="$VCPKG_ROOT/installed"; then # --x-install-root="$VCPKG_ROOT/installed"; then
find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do # find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do
echo "$_1:" # echo "$_1:"
echo "======" # echo "======"
cat "$_1" # cat "$_1"
echo "======" # echo "======"
echo "" # echo ""
done # done
exit 1 # exit 1
fi # fi
shell: bash # shell: bash
- name: Restore bridge files - name: Restore bridge files
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'

View File

@@ -269,7 +269,7 @@ def startgh(request):
#print(request) #print(request)
data_ = json.loads(request.body) data_ = json.loads(request.body)
####from here run the github action, we need user, repo, access token. ####from here run the github action, we need user, repo, access token.
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/rustdesk/actions/workflows/generator.yml/dispatches' url = 'https://api.github.com/repos/'+_settings.GHUSER+'/rdgen/actions/workflows/generator.yml/dispatches'
data = { data = {
"ref":"master", "ref":"master",
"inputs":{ "inputs":{