|
8 | 8 | os: [ubuntu-latest] |
9 | 9 | runs-on: ${{ matrix.os }} |
10 | 10 | steps: |
11 | | - - name: Install Go |
| 11 | + # 1. Bootstraps the runner with a working stable Go environment |
| 12 | + - name: Install Stable Go for Bootstrap |
12 | 13 | uses: actions/setup-go@v6 |
13 | 14 | with: |
14 | | - go-version: ${{ matrix.go-version }} |
| 15 | + go-version: 'stable' |
| 16 | + |
| 17 | + # 2. Automatically pulls and builds the unreleased 1.27 master branch |
| 18 | + - name: Download Go 1.27 (Tip) |
| 19 | + run: | |
| 20 | + go install golang.org/dl/gotip@latest |
| 21 | + gotip download |
| 22 | + # Overwrite standard 'go' commands by aliasing gotip to go in the system path |
| 23 | + echo "export PATH=\$HOME/sdk/gotip/bin:\$PATH" >> $GITHUB_ENV |
| 24 | + echo "$HOME/sdk/gotip/bin" >> $GITHUB_PATH |
| 25 | +
|
15 | 26 | - name: Install OpenMPI |
16 | 27 | if: matrix.os == 'ubuntu-latest' |
17 | 28 | run: sudo apt update && sudo apt install -y --no-install-recommends libopenmpi-dev openmpi-common openmpi-bin |
| 29 | + |
18 | 30 | - name: Checkout code |
19 | 31 | uses: actions/checkout@v2 |
| 32 | + |
| 33 | + # 3. Stringer will now compile under your new 1.27 path mapping |
20 | 34 | - name: Install Stringer |
21 | 35 | run: go install golang.org/x/tools/cmd/stringer@latest |
| 36 | + |
22 | 37 | - name: Build and Install |
23 | 38 | run: make install |
| 39 | + |
24 | 40 | - name: Test |
25 | 41 | run: make test |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +# on: [push, pull_request] |
| 46 | +# name: Test |
| 47 | +# jobs: |
| 48 | +# test: |
| 49 | +# strategy: |
| 50 | +# matrix: |
| 51 | +# go-version: ["1.27"] |
| 52 | +# os: [ubuntu-latest] |
| 53 | +# runs-on: ${{ matrix.os }} |
| 54 | +# steps: |
| 55 | +# - name: Install Go |
| 56 | +# uses: actions/setup-go@v6 |
| 57 | +# with: |
| 58 | +# go-version: ${{ matrix.go-version }} |
| 59 | +# - name: Install OpenMPI |
| 60 | +# if: matrix.os == 'ubuntu-latest' |
| 61 | +# run: sudo apt update && sudo apt install -y --no-install-recommends libopenmpi-dev openmpi-common openmpi-bin |
| 62 | +# - name: Checkout code |
| 63 | +# uses: actions/checkout@v2 |
| 64 | +# - name: Install Stringer |
| 65 | +# run: go install golang.org/x/tools/cmd/stringer@latest |
| 66 | +# - name: Build and Install |
| 67 | +# run: make install |
| 68 | +# - name: Test |
| 69 | +# run: make test |
0 commit comments