-
Notifications
You must be signed in to change notification settings - Fork 6
83 lines (80 loc) · 2.55 KB
/
build_installer.yaml
File metadata and controls
83 lines (80 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Installer
on:
push:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
windows-installer:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: rascal2
environment-file: environment.yaml
auto-activate-base: false
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2023a
- name: Make installer
shell: powershell
run: |
conda init powershell
conda activate rascal2
conda install -c nsis nsis=3.* accesscontrol
python packaging/build_exe.py
makensis packaging/windows/build_installer.nsi
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: windows installer
path: packaging/windows/*.exe
linux-installer:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2023a
- name: Make installer
shell: bash -l {0}
run: |
sudo apt-get update -y
sudo apt-get install -y makeself
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/hostedtoolcache/MATLAB/2023.1.999/x64/bin/glnxa64
cd packaging/linux
chmod 777 "build_installer.sh"
mkdir build
if [ ${{ github.ref_name }} == "main" ]; then
./build_installer.sh --remote
else
./build_installer.sh --remote --tag $GITHUB_REF_NAME
fi
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: linux installer
path: packaging/linux/*.run
deploy-nightly:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [windows-installer, linux-installer]
permissions:
contents: write
steps:
- name: Get artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Create nightly release
run: |
output=$(gh release delete nightly --cleanup-tag --yes --repo ${{ github.repository }} 2>&1) || [[ "${output}" == "release not found" ]]
gh release create nightly RasCAL* --prerelease --title "Nightly Build" --latest=false --repo ${{ github.repository }}
env:
GH_TOKEN: ${{ github.token }}