Skip to content

Commit

Permalink
adjust github actions for new nix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
neodix42 committed Dec 28, 2023
1 parent 089ef2e commit c920883
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 107 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/build-ton-linux-x86-64-portable.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/build-ton-macos-x86-64-portable.yml

This file was deleted.

25 changes: 14 additions & 11 deletions .github/workflows/ton-x86-64-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "TON x86_64 Linux binaries"
name: Ubuntu TON build (portable, x86-64)

on: [push,workflow_dispatch,workflow_call]

Expand All @@ -20,19 +20,22 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Compile
run: nix build .?submodules=1#packages.x86_64-linux.ton-oldglibc_staticbinaries --print-build-logs --system x86_64-linux -o result-x86_64

- name: Copy binaries
- name: Build TON
run: |
ls -lart
cp assembly/nix/linux-x86-64* .
cp assembly/nix/microhttpd.nix .
cp assembly/nix/openssl.nix .
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
nix-build linux-x86-64-static.nix
mkdir artifacts
cp $PWD/result-x86_64/bin/* artifacts/
cp ./result/bin/* artifacts/
chmod +x artifacts/*
cp $PWD/result-x86_64/lib/libtonlibjson.so.0.5 artifacts/libtonlibjson.so
cp $PWD/result-x86_64/lib/libemulator.so artifacts/
cp -R crypto/smartcont artifacts/
cp -R crypto/fift/lib artifacts/
rm -rf result
nix-build linux-x86-64-tonlib.nix
cp ./result/lib/libtonlibjson.so.0.5 artifacts/
cp ./result/lib/libemulator.so artifacts/
cp -r crypto/fift/lib artifacts/
cp -r crypto/smartcont artifacts/
- name: Simple binaries test
run: |
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/ton-x86-64-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Compile
run: nix build .?submodules=1#packages.x86_64-darwin.ton-staticbin-dylib --print-build-logs -o result-x86_64-darwin

- name: Copy binaries
- name: Build TON
run: |
ls -lart
cp assembly/nix/macos-* .
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
nix-build macos-static.nix
mkdir artifacts
cp $PWD/result-x86_64-darwin/bin/* artifacts/
cp ./result-bin/bin/* artifacts/
chmod +x artifacts/*
cp $PWD/result-x86_64-darwin/lib/libtonlibjson.dylib artifacts/
cp $PWD/result-x86_64-darwin/lib/libemulator.dylib artifacts/
cp -R crypto/smartcont artifacts/
cp -R crypto/fift/lib artifacts/
rm -rf result-bin
nix-build macos-tonlib.nix
cp ./result/lib/libtonlibjson.dylib artifacts/
cp ./result/lib/libemulator.dylib artifacts/
cp -r crypto/fift/lib artifacts/
cp -r crypto/smartcont artifacts/
- name: Simple binaries test
run: |
Expand Down
48 changes: 24 additions & 24 deletions assembly/cicd/jenkins/test-builds.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ pipeline {
cp assembly/nix/openssl.nix .
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
nix-build linux-x86-64-static.nix
mkdir tmp
cp ./result/bin/* tmp/
mkdir artifacts
cp ./result/bin/* artifacts/
rm -rf result
nix-build linux-x86-64-tonlib.nix
cp ./result/lib/libtonlibjson.so.0.5 tmp/
cp ./result/lib/libemulator.so tmp/
cp ./result/lib/libtonlibjson.so.0.5 artifacts/
cp ./result/lib/libemulator.so artifacts/
'''
sh '''
cd tmp
cd artifacts
cp -r ../crypto/fift/lib .
cp -r ../crypto/smartcont .
zip -9r ton-x86-64-linux-portable ./*
'''
archiveArtifacts artifacts: 'tmp/ton-x86-64-linux-portable.zip'
archiveArtifacts artifacts: 'artifacts/ton-x86-64-linux-portable.zip'
}
}
}
Expand Down Expand Up @@ -90,20 +90,20 @@ pipeline {
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
nix-build linux-arm64-static.nix
mkdir tmp
cp ./result/bin/* tmp/
mkdir artifacts
cp ./result/bin/* artifacts/
rm -rf result
nix-build linux-arm64-tonlib.nix
cp ./result/lib/libtonlibjson.so.0.5 tmp/
cp ./result/lib/libemulator.so tmp/
cp ./result/lib/libtonlibjson.so.0.5 artifacts/
cp ./result/lib/libemulator.so artifacts/
'''
sh '''
cd tmp
cd artifacts
cp -r ../crypto/fift/lib .
cp -r ../crypto/smartcont .
zip -9r ton-arm64-linux-portable ./*
'''
archiveArtifacts artifacts: 'tmp/ton-arm64-linux-portable.zip'
archiveArtifacts artifacts: 'artifacts/ton-arm64-linux-portable.zip'
}
}
}
Expand Down Expand Up @@ -136,20 +136,20 @@ pipeline {
cp assembly/nix/macos-* .
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
nix-build macos-static.nix
mkdir tmp
cp ./result-bin/bin/* tmp/
mkdir artifacts
cp ./result-bin/bin/* artifacts/
rm -rf result-bin
nix-build macos-tonlib.nix
cp ./result/lib/libtonlibjson.dylib tmp/
cp ./result/lib/libemulator.dylib tmp/
cp ./result/lib/libtonlibjson.dylib artifacts/
cp ./result/lib/libemulator.dylib artifacts/
'''
sh '''
cd tmp
cd artifacts
cp -r ../crypto/fift/lib .
cp -r ../crypto/smartcont .
zip -9r ton-x86-64-macos-portable ./*
'''
archiveArtifacts artifacts: 'tmp/ton-x86-64-macos-portable.zip'
archiveArtifacts artifacts: 'artifacts/ton-x86-64-macos-portable.zip'
}
}
}
Expand Down Expand Up @@ -182,20 +182,20 @@ pipeline {
cp assembly/nix/macos-* .
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
nix-build macos-static.nix
mkdir tmp
cp ./result-bin/bin/* tmp/
mkdir artifacts
cp ./result-bin/bin/* artifacts/
rm -rf result-bin
nix-build macos-tonlib.nix
cp ./result/lib/libtonlibjson.dylib tmp/
cp ./result/lib/libemulator.dylib tmp/
cp ./result/lib/libtonlibjson.dylib artifacts/
cp ./result/lib/libemulator.dylib artifacts/
'''
sh '''
cd tmp
cd artifacts
cp -r ../crypto/fift/lib .
cp -r ../crypto/smartcont .
zip -9r ton-arm64-macos-portable ./*
'''
archiveArtifacts artifacts: 'tmp/ton-arm64-macos-portable.zip'
archiveArtifacts artifacts: 'artifacts/ton-arm64-macos-portable.zip'
}
}
}
Expand Down

0 comments on commit c920883

Please sign in to comment.