Merge pull request #224 from Coeur/coeur/formula #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: {} | |
jobs: | |
Linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
volume: | |
- /tmp | |
- . | |
- relative-path | |
- / | |
asroot: | |
- name: '' | |
sudo: '' | |
- name: ' as root' | |
sudo: 'sudo ' | |
name: Linux ${{ matrix.volume }}${{ matrix.asroot.name }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo apt-get install -y libparted-dev libudev-dev | |
- run: make all extra | |
- if: matrix.volume == 'relative-path' | |
run: mkdir relative-path | |
- if: matrix.volume == '/' | |
run: sudo chmod a+w / | |
- run: ./f3write -V | |
- run: ./f3write --help | |
- run: ${{ matrix.asroot.sudo }}./f3write -s 2 -e 4 -w 50000 ${{ matrix.volume }} | |
- run: stat ${{ matrix.volume }}/2.h2w | |
- run: stat ${{ matrix.volume }}/3.h2w | |
- run: stat ${{ matrix.volume }}/4.h2w | |
- run: ./f3read -V | |
- run: ./f3read --help | |
- run: ${{ matrix.asroot.sudo }}./f3read -s 2 -e 4 -r 50000 ${{ matrix.volume }} | |
MacOS: | |
strategy: | |
fail-fast: false | |
matrix: | |
volume: | |
- /tmp | |
- . | |
- relative-path | |
# MacOS denies `sudo chmod a+w /` | |
#- / | |
asroot: | |
- name: '' | |
sudo: '' | |
- name: ' as root' | |
sudo: 'sudo ' | |
name: MacOS ${{ matrix.volume }}${{ matrix.asroot.name }} | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: brew install argp-standalone | |
- run: make | |
- if: matrix.volume == 'relative-path' | |
run: mkdir relative-path | |
- run: ./f3write -V | |
- run: ./f3write --help | |
- run: ${{ matrix.asroot.sudo }}./f3write -s 2 -e 4 -w 50000 ${{ matrix.volume }} | |
- run: stat ${{ matrix.volume }}/2.h2w | |
- run: stat ${{ matrix.volume }}/3.h2w | |
- run: stat ${{ matrix.volume }}/4.h2w | |
- run: ./f3read -V | |
- run: ./f3read --help | |
- run: ${{ matrix.asroot.sudo }}./f3read -s 2 -e 4 -r 50000 ${{ matrix.volume }} | |
Cygwin: | |
strategy: | |
fail-fast: false | |
matrix: | |
volume: | |
- cygwin: /cygdrive/c | |
windows: 'C:' | |
- cygwin: . | |
windows: . | |
- cygwin: relative-path | |
windows: relative-path | |
- cygwin: / | |
windows: 'C:\cygwin' | |
name: Cygwin ${{ matrix.volume.cygwin }} | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cygwin/cygwin-install-action@v2 | |
with: | |
packages: gcc-core libargp-devel make | |
- run: "$Env:LDFLAGS = '-Wl,--stack,4000000'; make" | |
- if: matrix.volume.windows == 'relative-path' | |
run: New-Item -ItemType Directory -Path relative-path | |
- run: '& .\f3write.exe -V' | |
- run: '& .\f3write.exe --help' | |
- run: '& .\f3write.exe -s 2 -e 4 -w 50000 ${{ matrix.volume.cygwin }}' | |
- run: 'Get-Item ${{ matrix.volume.windows }}\2.h2w' | |
- run: 'Get-Item ${{ matrix.volume.windows }}\3.h2w' | |
- run: 'Get-Item ${{ matrix.volume.windows }}\4.h2w' | |
- run: '& .\f3read.exe -V' | |
- run: '& .\f3read.exe --help' | |
- run: '& .\f3read.exe -s 2 -e 4 -r 50000 ${{ matrix.volume.cygwin }}' |