-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (74 loc) · 2.61 KB
/
install_script.yml
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
84
name: Installation script
on:
pull_request:
paths:
- scripts/install.sh
push:
branches:
- main
paths:
- scripts/install.sh
jobs:
# test_against_latest_release_arm:
# strategy:
# matrix:
# docker_image:
# - arm64v8/ubuntu
# name: Test against latest release (ARM)
# runs-on: ubuntu-latest
# steps:
# - name: Set up QEMU
# id: qemu
# uses: docker/setup-qemu-action@v3
# - uses: actions/checkout@v4
# - name: Run installation script in Docker
# run: |
# docker run --rm -v $(pwd):$(pwd) -e "RUST_LOG=pactuo=debug" --workdir $(pwd) ${{matrix.docker_image}} bash -c '
# set -e
# apt update && apt install -y unzip curl libatomic1
# echo "-------------------------------------"
# echo "Installing for CPU arch: $(uname -m)"
# bash ./scripts/install.sh
# echo "pactup --version"
# ~/.local/share/pactup/pactup --version
# echo "eval pactup env"
# eval "$(~/.local/share/pactup/pactup env)"
# echo "pactup install"
# ~/.local/share/pactup/pactup install 4.11
# echo "pact --version"
# ~/.local/share/pactup/pactup exec --using=4.11 -- pact --version
# '
test_against_latest_release:
name: Test against latest release
strategy:
matrix:
shell: [fish, zsh, bash]
setup:
- os: ubuntu
script_arguments: ""
- os: macos
script_arguments: ""
runs-on: ${{ matrix.setup.os }}-latest
steps:
- uses: actions/checkout@v4
- run: "sudo apt-get install -y ${{ matrix.shell }}"
name: Install ${{matrix.shell}} using apt-get
if: matrix.setup.os == 'ubuntu'
- run: "brew update && brew install ${{ matrix.shell }}"
name: Update formulae and install ${{matrix.shell}} using Homebrew
if: matrix.setup.os == 'macos'
- run: |
if [ -f ~/.bashrc ]; then
cp ~/.bashrc ~/.bashrc.bak
echo 'echo hello world' > ~/.bashrc
echo '. ~/.bashrc.bak' >> ~/.bashrc
fi
if [ -f ~/.zshrc ]; then
echo 'echo hello world' > ~/.zshrc
echo '. ~/.zshrc.bak' >> ~/.zshrc
fi
name: reset shell profiles
- run: "env SHELL=$(which ${{ matrix.shell }}) bash ./scripts/install.sh ${{ matrix.setup.script_arguments }}"
name: Run the installation script
- run: ./scripts/test_installation_script.sh ${{ matrix.shell }}
name: "Test installation script"