1
0
forked from shaytan/rdgen

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

View File

@@ -269,7 +269,7 @@ def startgh(request):
#print(request)
data_ = json.loads(request.body)
####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 = {
"ref":"master",
"inputs":{